/* Event Card (כרטיס אירוע) specific styles (extracted from ui.css) */

.module-source-icon[data-module="event-card"] {
    --module-icon-color: var(--lbl5);
}

.app-confirm-modal.event-card-seating-missing-sketch-modal .inv-sms-confirm-btn {
    padding: 8px 20px;
    white-space: nowrap;
}


#screen-event-card .sketch-load-template-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

#screen-event-card .sketch-load-template-btn:hover {
    background: var(--primary-light);
}

#screen-event-card .sketch-event-source-meta {
    width: 100%;
    max-width: 760px;
    border: 1px solid var(--border);
    background: var(--bg-app);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#screen-event-card .sketch-event-source-main {
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
}

#screen-event-card .sketch-event-source-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--text1);
}

#screen-event-card .sketch-canvas-placeholder {
    width: 100%;
    height: 500px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: radial-gradient(#f1f5f9 1.5px, transparent 1.5px);
    background-size: 30px 30px;
}

#screen-event-card .empty-message-box {
    text-align: center;
    padding: 20px;
    max-width: 450px;
}

#screen-event-card .empty-icon-wrap {
    font-size: 40px;
    color: #cbd5e1;
    margin-bottom: 15px;
}

#screen-event-card .empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

#screen-event-card .empty-text {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

#screen-event-card .empty-text-secondary {
    margin-top: 10px;
    font-weight: 500;
}

#screen-event-card .inner-border {
    border: 1px solid #f1f5f9;
    padding: 30px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 767px) {
    #screen-event-card .sketch-load-template-btn {
        width: 100%;
        justify-content: center;
    }

    #screen-event-card .sketch-event-source-meta {
        max-width: 100%;
    }
}

/* Event Card > Meetings tab: larger meeting date-picker popover (~20%) */
#screen-event-card .diary-module.meeting-three-col .tw-date-picker .tw-dp-popover,
#screen-event-card .diary-module.event-three-col .tw-date-picker .tw-dp-popover,
.tw-dp-popover.event-card-diary-reserved-date-popover {
    width: 282px;
    padding: 10px;
    border-radius: 14px;
}


#screen-event-card .diary-module.meeting-three-col .tw-date-picker .tw-dp-head,
#screen-event-card .diary-module.event-three-col .tw-date-picker .tw-dp-head,
.tw-dp-popover.event-card-diary-reserved-date-popover .tw-dp-head {
    margin-bottom: 8px;
}

#screen-event-card .diary-module.meeting-three-col .tw-date-picker .tw-dp-month-year,
#screen-event-card .diary-module.event-three-col .tw-date-picker .tw-dp-month-year,
.tw-dp-popover.event-card-diary-reserved-date-popover .tw-dp-month-year {
    height: 34px;
    font-size: 14px;
    border-radius: 10px;
}

#screen-event-card .diary-module.meeting-three-col .tw-date-picker .tw-dp-nav,
#screen-event-card .diary-module.event-three-col .tw-date-picker .tw-dp-nav,
.tw-dp-popover.event-card-diary-reserved-date-popover .tw-dp-nav {
    width: 34px;
    height: 34px;
    font-size: 16px;
    border-radius: 10px;
}

#screen-event-card .diary-module.meeting-three-col .tw-date-picker .tw-dp-dow,
#screen-event-card .diary-module.event-three-col .tw-date-picker .tw-dp-dow,
.tw-dp-popover.event-card-diary-reserved-date-popover .tw-dp-dow {
    gap: 5px;
    margin-bottom: 8px;
}

#screen-event-card .diary-module.meeting-three-col .tw-date-picker .tw-dp-dow-item,
#screen-event-card .diary-module.event-three-col .tw-date-picker .tw-dp-dow-item,
.tw-dp-popover.event-card-diary-reserved-date-popover .tw-dp-dow-item {
    font-size: 12px;
}

#screen-event-card .diary-module.meeting-three-col .tw-date-picker .tw-dp-grid,
#screen-event-card .diary-module.event-three-col .tw-date-picker .tw-dp-grid,
.tw-dp-popover.event-card-diary-reserved-date-popover .tw-dp-grid {
    gap: 5px;
}

#screen-event-card .diary-module.meeting-three-col .tw-date-picker .tw-dp-day,
#screen-event-card .diary-module.event-three-col .tw-date-picker .tw-dp-day,
.tw-dp-popover.event-card-diary-reserved-date-popover .tw-dp-day {
    height: 34px;
    font-size: 13px;
}

#screen-event-card .diary-module.meeting-three-col .tw-date-picker .tw-dp-foot-btn,
#screen-event-card .diary-module.event-three-col .tw-date-picker .tw-dp-foot-btn,
.tw-dp-popover.event-card-diary-reserved-date-popover .tw-dp-foot-btn {
    min-height: 42px;
    font-size: 14px;
}

#screen-event-card .diary-module.meeting-three-col .tw-date-picker .tw-dp-foot,
#screen-event-card .diary-module.event-three-col .tw-date-picker .tw-dp-foot,
.tw-dp-popover.event-card-diary-reserved-date-popover .tw-dp-foot {
    display: none;
}

/* ===== Event Card: Menu tab ===== */
#screen-event-card .event-menu-tab-panel .form-container[data-ec-container="1"] {
    max-width: none;
    width: 100%;
}

#screen-event-card .event-menu-tab-panel > .content-scroll {
    padding-left: 0;
    padding-right: 0;
}

#screen-event-card .event-menu-board {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    gap: 8px;
    width: 100%;
}

#screen-event-card .event-menu-top-actions-outside {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
    width: 100%;
}

#screen-event-card .event-menu-panel-left {
    width: 100%;
}

#screen-event-card .event-menu-mobile-picker {
    display: none;
}

#screen-event-card .event-menu-mobile-drag-handle {
    display: none;
}

#screen-event-card .event-menu-mobile-remove-btn {
    display: none;
}

#screen-event-card .event-menu-mobile-fab-wrap {
    display: none;
}

#screen-event-card .event-menu-mobile-fixed-notes-field {
    display: none;
}

#screen-event-card .event-menu-panel {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: var(--white);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

#screen-event-card .event-menu-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
}

#screen-event-card .event-menu-panel-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

#screen-event-card .event-menu-picker-field,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-picker-field {
    flex: 1 1 auto;
    margin: 0;
    max-width: 320px;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body [data-event-card-custom-fields="1"][data-event-card-custom-fields-type="menu"] {
    display: none;
}

#screen-event-card .event-menu-picker-field .form-label,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-picker-field .form-label {
    display: block;
    margin-bottom: 6px;
}

#screen-event-card .event-menu-picker-select,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-picker-select {
    width: 100%;
}

#screen-event-card .event-menu-fixed-notes-field,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-fixed-notes-field {
    margin: 0;
    padding: 12px 14px;
}

#screen-event-card .event-menu-fixed-notes-field {
    background: var(--white);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-fixed-notes-field {
    background: #fbfcff;
}

#screen-event-card .event-menu-fixed-notes-block,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-fixed-notes-block {
    width: 100%;
    min-height: 96px;
    resize: none;
    font-size: 14px;
    padding: 12px 14px;
    border-top: 1px solid var(--border-soft);
    background: var(--white);
}

#screen-event-card .event-menu-fixed-notes-block:focus,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-fixed-notes-block:focus {
    border-color: var(--border-soft);
    outline: none;
}

#screen-event-card .event-menu-fixed-notes-title,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-fixed-notes-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

#screen-event-card .event-menu-fixed-notes-text,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-fixed-notes-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text1);
    white-space: pre-line;
}

#screen-event-card .event-menu-panel-body {
    padding: 12px;
    overflow: auto;
    flex: 1 1 auto;
}

#screen-event-card .event-menu-source-body {
    background: var(--bg-app);
}

#screen-event-card .event-menu-source-body.is-loading {
    position: relative;
    min-height: 120px;
    pointer-events: none;
}

#screen-event-card .event-menu-source-body.is-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.65);
    z-index: 1;
}

#screen-event-card .event-menu-source-body.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid var(--border-soft);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: ec-menu-spin 0.8s linear infinite;
    z-index: 2;
}

@keyframes ec-menu-spin {
    to { transform: rotate(360deg); }
}

#screen-event-card .event-menu-selected-body {
    background: var(--white);
    min-height: 0;
    border: 2px dashed transparent;
    border-radius: 12px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

#screen-event-card .event-menu-selected-body.drag-over {
    border-color: var(--primary);
    background: var(--bg-app);
}

#screen-event-card .event-menu-category-card {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--white);
    margin-bottom: 12px;
    overflow: hidden;
}

#screen-event-card .event-menu-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border-soft);
}

#screen-event-card .event-menu-category-img {
    width: 64px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 auto;
    background: var(--lightgray);
}

#screen-event-card .event-menu-category-info {
    min-width: 0;
    flex: 1 1 auto;
}

#screen-event-card .event-menu-category-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
}

#screen-event-card .event-menu-category-notes {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text1);
}

#screen-event-card .event-menu-dish-list {
    padding: 8px;
}

#screen-event-card .event-menu-dish-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--white);
    margin-bottom: 8px;
    cursor: grab;
    user-select: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

#screen-event-card .event-menu-dish-row:hover {
    border-color: var(--primary-3);
    background: var(--white);
}

#screen-event-card .event-menu-dish-row.is-selected {
    background: var(--white);
    cursor: default;
}

#screen-event-card .event-menu-dish-row.is-selected:hover {
    border-color: var(--border-soft);
    background: var(--white);
}

#screen-event-card .event-menu-dish-row.dragging {
    opacity: 0.55;
}

#screen-event-card .event-menu-dish-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
}

#screen-event-card .event-menu-dish-desc,
#screen-event-card .event-menu-dish-notes,
#screen-event-card .event-menu-selected-dish-desc,
#screen-event-card .event-menu-selected-dish-notes {
    font-size: 12px;
    color: var(--text1);
}

#screen-event-card .event-menu-dish-actions,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: -2px;
}

#screen-event-card .event-menu-dish-note-trigger,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: transparent;
    color: var(--text1);
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

#screen-event-card .event-menu-dish-note-trigger svg,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-trigger svg {
    width: 13px;
    height: 13px;
    opacity: 0.78;
}

#screen-event-card .event-menu-dish-note-trigger .event-menu-dish-note-icon-close,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-trigger .event-menu-dish-note-icon-close {
    display: none;
}

#screen-event-card .event-menu-dish-note-trigger[aria-expanded="true"] .event-menu-dish-note-icon-pencil,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-trigger[aria-expanded="true"] .event-menu-dish-note-icon-pencil {
    display: none;
}

#screen-event-card .event-menu-dish-note-trigger[aria-expanded="true"] .event-menu-dish-note-icon-close,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-trigger[aria-expanded="true"] .event-menu-dish-note-icon-close {
    display: inline-block;
}

#screen-event-card .event-menu-dish-note-trigger .event-menu-dish-note-trigger-label-close,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-trigger .event-menu-dish-note-trigger-label-close {
    display: none;
}

#screen-event-card .event-menu-dish-note-trigger[aria-expanded="true"] .event-menu-dish-note-trigger-label-open,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-trigger[aria-expanded="true"] .event-menu-dish-note-trigger-label-open {
    display: none;
}

#screen-event-card .event-menu-dish-note-trigger[aria-expanded="true"] .event-menu-dish-note-trigger-label-close,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-trigger[aria-expanded="true"] .event-menu-dish-note-trigger-label-close {
    display: inline;
}

#screen-event-card .event-menu-dish-note-trigger span,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-trigger span {
    font-size: 11px;
}

#screen-event-card .event-menu-dish-note-trigger.is-active,
#screen-event-card .event-menu-dish-row.is-note-open .event-menu-dish-note-trigger,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-trigger.is-active,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-row.is-note-open .event-menu-dish-note-trigger {
    border-color: var(--border-soft);
    background: var(--lightgray);
    color: var(--text1);
}

#screen-event-card .event-menu-dish-choice-note,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-choice-note {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text1);
    font-size: 12px;
    line-height: 1.45;
}

#screen-event-card .event-menu-dish-note-popover,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-popover {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--white);
}

#screen-event-card .event-menu-dish-note-quick-actions,
#screen-event-card .event-menu-dish-note-footer,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-quick-actions,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#screen-event-card .event-menu-dish-note-popover .event-menu-dish-note-quick-actions,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-popover .event-menu-dish-note-quick-actions {
    display: none !important;
}

#screen-event-card .event-menu-dish-note-presets,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#screen-event-card .event-menu-dish-note-presets-title,
#screen-event-card .event-menu-dish-note-label,
#screen-event-card .event-menu-dish-note-empty,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-presets-title,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-label,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-empty {
    font-size: 11px;
    color: var(--text1);
}

#screen-event-card .event-menu-dish-note-label,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-label {
    font-weight: 600;
    font-size: 13px;
}

#screen-event-card .event-menu-dish-note-presets-title,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-presets-title {
    display: none;
}

#screen-event-card .event-menu-dish-note-action,
#screen-event-card .event-menu-dish-note-preset,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-action,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-preset {
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--lightgray);
    color: var(--text1);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

#screen-event-card .event-menu-dish-note-footer .event-menu-dish-note-action:first-child,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-footer .event-menu-dish-note-action:first-child {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

#screen-event-card .event-menu-dish-note-footer .event-menu-dish-note-action,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-footer .event-menu-dish-note-action {
    height: 30px;
}

#screen-event-card .event-menu-dish-note-input,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-note-input {
    min-height: 64px;
    padding: 8px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--white);
    color: var(--black);
    font-size: 13px;
    line-height: 1.45;
    resize: vertical;
    margin-top: -3px;
}

#screen-event-card .event-menu-dish-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#screen-event-card .event-menu-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--lightgray);
    color: var(--black);
    font-size: 11px;
    font-weight: 600;
}

#screen-event-card .event-menu-selected-category {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
    background: var(--white);
}

#screen-event-card .event-menu-selected-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

#screen-event-card .event-menu-selected-category-img {
    width: 56px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 auto;
    background: var(--lightgray);
}

#screen-event-card .event-menu-selected-category-info {
    min-width: 0;
    flex: 1 1 auto;
}

#screen-event-card .event-menu-selected-category-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
}

#screen-event-card .event-menu-selected-category-notes {
    margin-top: 3px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text1);
}

#screen-event-card .event-menu-selected-dish-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 8px 10px;
    margin-top: 8px;
}

#screen-event-card .event-menu-selected-dish-content {
    min-width: 0;
    flex: 1 1 auto;
}

#screen-event-card .event-menu-selected-dish-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
}

#screen-event-card .event-menu-selected-remove {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--white);
    color: var(--red);
    font-weight: 700;
    cursor: pointer;
}

#screen-event-card .event-menu-selected-remove:hover {
    border-color: var(--red);
}

#screen-event-card .event-menu-clear-btn {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 13px;
}

#screen-event-card .event-menu-issue-btn {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 13px;
}

#screen-event-card .event-menu-empty {
    padding: 18px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    color: var(--text2);
    font-size: 13px;
    text-align: center;
    background: var(--bg-app);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    min-height: 420px;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-panel {
    height: 100%;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal {
    --event-menu-border: var(--border-soft, #e2e8f0);
    --event-menu-bg-app: #f7f9fc;
    --event-menu-white: var(--white, #ffffff);
    --event-menu-text1: var(--text1, #5b6581);
    --event-menu-black: var(--black, #111827);
    --event-menu-primary: var(--primary, #1e4e84);
    --event-menu-lightgray: var(--lightgray, #eef2f7);
    --event-menu-red: var(--red, #ef4444);
    background: var(--event-menu-bg-app);
}

.documents-editor-container.print-preview-modal .event-menu-doc-chooser {
    flex: 0 0 30%;
    max-width: 30%;
    min-width: 0;
    overflow-y: auto;
    background: var(--bg-mobile);
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal.is-print-preview-mode .event-menu-doc-chooser {
    flex: 0 0 40%;
    max-width: 40%;
    padding-top: 16px;
    background: var(--white);
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .order-doc-preview {
    flex: 1 1 70%;
    min-width: 0;
    padding: 16px;
    border-inline-start: 1px solid var(--event-menu-border);
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .order-doc-preview iframe {
    width: 100%;
    height: 100%;
    min-height: 560px;
    border: none;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
}

@media (min-width: 768px) {
    .documents-editor-container.print-preview-modal.event-menu-doc-modal {
        top: 50%;
        left: 50%;
        width: min(1520px, calc(100vw - 64px));
        height: calc(100vh - 12px);
        max-width: none;
        max-height: none;
        transform: translate(-50%, -50%);
        border-radius: 1px;
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .toolbar {
        display: flex;
        justify-content: flex-start;
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-direct-control {
        display: none !important;
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-options {
        display: flex !important;
        position: relative;
        margin-inline-start: auto;
        margin-inline-end: 0;
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-persistent-control {
        min-width: 132px;
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-options-trigger {
        min-width: 136px;
        min-height: 42px;
        border-radius: 10px;
        justify-content: center;
        gap: 8px;
        background: var(--primary);
        border-color: var(--primary);
        color: var(--white);
        font-weight: 400;
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-options-trigger svg {
        transition: transform 0.2s ease;
        transform-origin: center;
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-options.is-open .event-menu-toolbar-options-trigger svg {
        transform: rotate(90deg);
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-options.is-open .event-menu-toolbar-options-menu {
        display: flex;
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-options-menu {
        display: none;
        position: absolute;
        inset-inline-end: 0;
        bottom: calc(100% + 8px);
        min-width: 240px;
        padding: 8px;
        border: 1px solid var(--border-soft);
        border-radius: 12px;
        background: var(--white);
        box-shadow: 0 12px 34px rgba(15, 23, 42, 0.18);
        flex-direction: column;
        gap: 6px;
        z-index: 8;
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-options-item {
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        border: 1px solid var(--border-soft);
        border-radius: 10px;
        background: var(--white);
        color: var(--text1);
        padding: 10px 12px;
        font-size: 14px;
        font-weight: 600;
        text-align: right;
        direction: rtl;
        cursor: pointer;
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-options-item svg {
        flex: 0 0 auto;
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-options-item span {
        flex: 1 1 auto;
        text-align: right;
    }
}

.documents-editor-container.print-preview-modal .event-menu-doc-chooser .event-menu-doc-body {
    min-height: 0;
    height: 100%;
    grid-template-columns: 1fr;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-dropzone.drag-over {
    outline: 2px dashed var(--event-menu-primary);
    outline-offset: -6px;
    border-radius: 14px;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-sign-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    color: var(--event-menu-primary);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-sign-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--event-menu-primary);
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-sign-toggle-text {
    color: var(--event-menu-primary);
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-options {
    display: none;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-persistent-control {
    min-height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-persistent-control.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-toolbar-back-control {
    display: none;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal.is-print-preview-mode .event-menu-toolbar-preview-control {
    display: none;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal.is-print-preview-mode .event-menu-toolbar-back-control {
    display: inline-flex;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-controls {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--event-menu-border);
    background: var(--white);
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-controls.hidden {
    display: none;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-controls-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-controls-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-controls-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--event-menu-primary);
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-controls-subtitle {
    display: none;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-controls-status-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-fit-status {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-fit-status.tone-neutral {
    background: var(--lightgray);
    color: var(--text1);
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-fit-status.tone-success {
    background: rgba(52, 168, 83, 0.12);
    color: #1f7a38;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-fit-status.tone-warn {
    background: rgba(220, 38, 38, 0.14);
    color: #b42318;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-fit-warning {
    max-width: 260px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--event-menu-text1);
    text-align: right;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-fit-warning.hidden {
    display: none;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-controls-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-preset-row,
.documents-editor-container.print-preview-modal.event-menu-doc-modal [data-menu-doc-print-action="autofit"] {
    display: none !important;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-control-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--event-menu-border);
    border-radius: 12px;
    background: #fbfcff;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-control-label,
.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-select-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--event-menu-primary);
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-stepper-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px auto;
    gap: 8px;
    align-items: center;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-step-btn,
.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-reset-btn {
    min-height: 34px;
    padding: 4px 10px;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-reset-btn {
    display: none;
    font-size: 13px;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-step-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid var(--event-menu-border);
    border-radius: 10px;
    background: var(--white);
    color: var(--event-menu-black);
    font-size: 13px;
    font-weight: 700;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--event-menu-border);
    border-radius: 12px;
    background: var(--white);
    color: var(--event-menu-black);
    font-size: 13px;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--event-menu-primary);
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-preset-row,
.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-actions-row .btn,
.documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-preset-buttons .btn {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 13px;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal.is-print-preview-mode .order-doc-preview {
    background: #eef2f7;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.documents-editor-container.print-preview-modal.event-menu-doc-modal.is-print-preview-mode .event-menu-doc-body .event-menu-panel-right > :not(.event-menu-print-controls) {
    display: none;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--event-menu-border);
    background: #fbfcff;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-panel-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--event-menu-primary);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-panel-body {
    padding: 12px;
    overflow: auto;
    flex: 1 1 auto;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-source-body {
    background: #fbfcff;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-selected-body {
    background: var(--event-menu-white);
    border: 2px dashed transparent;
    border-radius: 12px;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-selected-body.drag-over {
    border-color: var(--event-menu-primary);
    background: var(--event-menu-bg-app);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-category-card {
    border: 1px solid var(--event-menu-border);
    border-radius: 12px;
    background: var(--bg);
    margin-bottom: 24px;
    overflow: hidden;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--event-menu-border);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-category-img {
    width: 64px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--event-menu-lightgray);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-category-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--event-menu-black);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-category-notes {
    margin-top: 4px;
    font-size: 12px;
    color: var(--event-menu-text1);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-list {
    padding: 8px;
    margin-right: 2rem;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--event-menu-border);
    border-radius: 10px;
    background: var(--event-menu-white);
    margin-bottom: 8px;
    cursor: grab;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-row:hover {
    border-color: var(--primary-3);
    background: var(--event-menu-white);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-row.is-selected {
    background: var(--event-menu-lightgray);
    cursor: default;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-row.is-selected:hover {
    border-color: var(--event-menu-border);
    background: var(--event-menu-lightgray);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-row.dragging {
    opacity: 0.55;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--event-menu-black);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-desc,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-notes,
.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-selected-dish-desc {
    font-size: 12px;
    color: var(--event-menu-text1);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--event-menu-lightgray);
    color: var(--event-menu-black);
    font-size: 11px;
    font-weight: 600;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-selected-category {
    border: 1px solid var(--event-menu-border);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
    background: var(--event-menu-white);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-selected-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-selected-category-img {
    width: 56px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--event-menu-lightgray);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-selected-category-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--event-menu-black);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-selected-category-notes {
    margin-top: 3px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--event-menu-text1);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-selected-dish-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--event-menu-border);
    border-radius: 10px;
    padding: 8px 10px;
    margin-top: 8px;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-selected-dish-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--event-menu-black);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-selected-remove {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 1px solid var(--event-menu-border);
    border-radius: 8px;
    background: var(--event-menu-white);
    color: var(--event-menu-red);
    font-weight: 700;
    cursor: pointer;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-selected-remove:hover {
    border-color: var(--event-menu-red);
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-clear-btn {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 13px;
}

.documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-empty {
    padding: 14px;
    border: 1px dashed var(--event-menu-border);
    border-radius: 10px;
    color: var(--event-menu-text1);
    font-size: 13px;
    text-align: center;
}

.documents-editor-container.print-preview-modal .order-doc-edit .menu-doc-category-box {
    margin-bottom: 14px;
}

.documents-editor-container.print-preview-modal .order-doc-edit .menu-doc-category-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.documents-editor-container.print-preview-modal .order-doc-edit .menu-doc-category-thumb {
    width: 58px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--lightgray);
    flex: 0 0 auto;
}

.documents-editor-container.print-preview-modal .order-doc-edit .menu-doc-dishes-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.documents-editor-container.print-preview-modal .order-doc-edit .menu-doc-dish-editor-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 900px) {
    #screen-event-card .event-menu-board {
        grid-template-columns: 1fr;
    }
    .documents-editor-container.print-preview-modal .event-menu-doc-body {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .documents-editor-container.print-preview-modal.event-menu-doc-modal .order-doc-preview iframe {
        min-height: 260px;
    }
    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-controls-header,
    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-preset-row,
    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-actions-row {
        flex-direction: column;
        align-items: stretch;
    }
    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-controls-grid,
    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-toggle-grid {
        grid-template-columns: 1fr;
    }
    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-stepper-row {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
    }
    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-print-reset-btn {
        grid-column: 1 / -1;
    }
}

@media (min-width: 901px) {
    #screen-event-card .results .table.no-venue-col > .table-head,
    #screen-event-card .results .table.no-venue-col > .table-body > .table-row {
        grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr 1fr;
    }
}

#screen-event-card .results .table > .table-head > div:nth-child(3),
#screen-event-card .results .table > .table-body > .table-row > div:nth-child(3) {
    text-align: center;
    justify-content: center;
}

#screen-event-card .event-card-table-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    position: sticky;
    bottom: 0;
    border-top: none;
    min-height: 52px;
    border-top: 1px solid #f1f5f9;
    padding: .6rem 1rem;
    background: #fafbfb;
    justify-content: space-between;
    flex-direction: row-reverse;
}

#screen-event-card .event-card-table-footer-count {
    text-align: left;
    font-size: clamp(13px, 2vw, 14px);
    font-weight: 500;
    color: var(--text1);
    margin-right: auto;
}

#screen-event-card .event-card-pagination-controls {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

#screen-event-card #eventCardPageSizeSelect.input {
    text-align: center;
    order: 0;
    height: 32px !important;
    min-height: unset;
    font-size: 14px;
    cursor: pointer;
    background-color: #fdfdfd !important
}



.event-editor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 130;
    opacity: 1;
    pointer-events: none;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.event-editor-container {
    top: 0;
    height: 100vh;
    width: 100%;
    max-height: 100vh;
    background: var(--bg-app);
    border-radius: 0;
}

.event-editor-container.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    overflow-y: auto;
    max-height: 85%;
    direction: rtl;
    z-index: 2120;
}

.event-editor-container.is-open {
    max-height: unset;
    z-index: 2000;
    padding-bottom: 4rem;
}

/* Event Card: darker overlay and cover header too */
#event-card-overlay.ui-overlay {
    background-color:rgba(30, 78, 132, 0.85);
    z-index: 2050;
    transition: opacity 0.65s ease;
}

@keyframes ecEventCardFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ecEventCardFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Overlay: match the demo's fade timing on open/close */
#event-card-overlay.ui-overlay.is-active:not(.closing) {
    animation: ecEventCardFadeIn 0.3s ease-out both;
    transition: none;
}

#event-card-overlay.ui-overlay.is-active.closing {
    animation: ecEventCardFadeOut 0.3s ease-in both;
    transition: none;
}

/* Event Card: overlay close (X) button */
.event-card-overlay-close {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 56px;
    height: 56px;
    border: 0;
    background: transparent;
    border-radius: 0;
    color: var(--primary);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2125;
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

.event-card-overlay-close svg {
    width: 53px;
    height: 53px;
    stroke-width: 1.5px;
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

.event-card-overlay-close line,
.event-card-overlay-close path {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

.event-card-overlay-close.is-active {
    display: flex;
}

.event-card-overlay-close:hover {
    opacity: 1;
}

/* Desktop: keep the X close to the centered modal (not the viewport corner) */
@media (min-width: 901px) {
    .event-card-overlay-close {
        top: 10px;
        left: 10px;
    }
}

/* Keep the Event Card editor above the overlay */
#screen-event-card .event-editor-container.is-open {
    z-index: 2100;
}

/* Event Card: fixed bottom save button (mobile only) */
@media (max-width: 767px) {
    #screen-event-card .event-editor-container.is-open .event-editor > .editor-actions {
        display: none;
    }
}

/* Event Card: Floating FAB + Quick-note panel */

@media (min-width: 768px) {
    #screen-event-card .event-desktop-header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    #screen-event-card .event-desktop-header-actions .editor-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
        padding: 0;
        flex-direction: row-reverse;
        justify-content: flex-start;
    }

    #event-floating-save-bar {
        position: fixed;
        right: 4vw;
        bottom: 8vh;
        width: auto;
        background: transparent;
        border-top: 0;
        padding: 0;
        z-index: 2200;
        box-sizing: border-box;
        display: flex;
        justify-content: flex-end;
        direction: ltr;
    }

    #event-floating-save-bar .editor-actions {
        width: auto;
        justify-content: flex-end;
    }

    #event-floating-save-bar .editor-actions .btn.btn-primary {
        margin: 0;
        width: calc(12vw + 30px);
        direction: rtl;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
        border-radius: 8px;
        font-size: 126.5%;
        padding: 5% 5%;
        transform: scale(1.1);
    }

    #event-floating-save-bar .editor-actions .btn.btn-primary svg {
        width: 27.6px;
        height: 27.6px;
    }
}

#screen-event-card .event-editor-container.is-open .event-editor > .editor-actions .btn {
    width: auto;
    justify-content: center;
}

#screen-event-card .event-staffing-tab-panel > .content-scroll {
    padding-inline: 0;
}

#screen-event-card .event-staffing-root {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin: 10px auto 0;
}

#screen-event-card .event-staffing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
}

#screen-event-card .event-staffing-actions .btn {
    min-height: 42px;
    font-size: 13px;
}

#screen-event-card .event-staffing-actions .btn:first-child {
    gap: 0;
}

#screen-event-card .event-staffing-actions .btn:first-child span {
    display: none;
}

#screen-event-card .event-staffing-hint {
    display: none;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text1);
    font-size: 13px;
    font-weight: 600;
}

#screen-event-card .event-staffing-hint.is-visible {
    display: block;
}

#screen-event-card .event-staffing-hint.tone-ok {
    border-color: var(--lbl14);
    color: var(--lbl14);
}

#screen-event-card .event-staffing-hint.tone-ok.is-visible {
    display: inline-flex;
    width: fit-content;
    padding-inline: 30px;
}

#screen-event-card .event-staffing-hint.tone-warn {
    color: var(--primary);
    border: 0;
    background: transparent;
    padding: 0;
}

#screen-event-card .event-staffing-hint.tone-warn.is-visible {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#screen-event-card .event-staffing-hint.tone-warn::before {
    content: '';
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E4E84' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3C/svg%3E");
}

#screen-event-card .event-staffing-hint.tone-danger {
    border-color: var(--red);
    color: var(--red);
}

#screen-event-card .event-staffing-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

#screen-event-card .event-staffing-kpi {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    padding: 14px;
    width: 90%;
    flex-direction: column;
    gap: 4px;
    min-height: 112px;
}

#screen-event-card .event-staffing-kpi.is-danger {
    border-color: var(--red);
}

#screen-event-card .event-staffing-kpi.is-warn {
    border-color: var(--lbl4);
}

#screen-event-card .event-staffing-kpi.is-ok {
    border-color: var(--lbl14);
}

#screen-event-card .event-staffing-kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text1);
}

#screen-event-card .event-staffing-kpi-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-top: 7px;
}

#screen-event-card .event-staffing-kpi-meta {
    display: none;
}

#screen-event-card .event-staffing-table-wrap {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
}

#screen-event-card .event-staffing-table-wrap::-webkit-scrollbar {
    height: 6px;
}

#screen-event-card .event-staffing-table-wrap::-webkit-scrollbar-thumb {
    border-radius: 999px;
}

#screen-event-card .event-staffing-table-wrap::-webkit-scrollbar-track {
}

#screen-event-card .event-staffing-table {
    padding: 0;
    min-width: 100%;
}

#screen-event-card .event-staffing-table > .table-head,
#screen-event-card .event-staffing-table > .table-body > .table-row {
    display: grid;
    align-items: stretch;
    gap: 8px;
}

#screen-event-card .event-staffing-table > .table-head > div,
#screen-event-card .event-staffing-table > .table-body > .table-row > div {
    min-width: 0;
}

#screen-event-card .event-staffing-table > .table-head > div .sort-icon {
    transition: opacity 0.16s ease, color 0.16s ease;
}

#screen-event-card .event-staffing-table > .table-head > div .sort-icon svg {
    transition: transform 0.16s ease;
}

#screen-event-card .event-staffing-table > .table-head > div.is-sorted .sort-icon {
    opacity: 1;
    color: var(--primary);
}

#screen-event-card .event-staffing-table > .table-head > div[data-sort-dir="asc"] .sort-icon svg {
    transform: rotate(180deg);
}

#screen-event-card .event-staffing-table > .table-head > div[data-sort-dir="desc"] .sort-icon svg {
    transform: rotate(0deg);
}

#screen-event-card .event-staffing-requirements-table > .table-head,
#screen-event-card .event-staffing-requirements-table > .table-body > .table-row {
    grid-template-columns: minmax(160px, 1.3fr) 80px 80px 120px minmax(180px, 1.2fr) minmax(150px, 1fr);
}

#screen-event-card .event-staffing-assignments-table > .table-head,
#screen-event-card .event-staffing-assignments-table > .table-body > .table-row {
    grid-template-columns: minmax(150px, 1.1fr) minmax(120px, 0.8fr) minmax(170px, 1fr) minmax(150px, 0.9fr) 110px 120px 130px minmax(180px, 1fr);
}

#screen-event-card .event-staffing-assignments-table {
    width: 100%;
    min-width: 1230px;
}

#screen-event-card .event-staffing-row {
    border-inline-start: 4px solid transparent;
    padding-inline-start: 20px;
}

#screen-event-card .event-staffing-requirements-row.has-shortage {
    border-inline-start-color: var(--red);
}

#screen-event-card .event-staffing-requirements-row.has-surplus {
    border-inline-start-color: var(--yellow);
}

#screen-event-card .event-staffing-assignments-row.has-conflict {
    border-inline-start-color: var(--red);
}

#screen-event-card .event-staffing-cell-primary {
    font-weight: 700;
    color: var(--text1);
}

#screen-event-card .event-staffing-card-kicker {
    display: none;
}

#screen-event-card .event-staffing-card-title-text,
#screen-event-card .event-staffing-card-subtitle-text,
#screen-event-card .event-staffing-card-time-text,
#screen-event-card .event-staffing-card-value,
#screen-event-card .event-staffing-card-meta-text,
#screen-event-card .event-staffing-card-notes-text {
    display: block;
    min-width: 0;
}

#screen-event-card .event-staffing-cell-notes {
    color: var(--text1);
    line-height: 1.45;
}

#screen-event-card .event-staffing-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

#screen-event-card .event-staffing-inline-btn {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 13px;
}

#screen-event-card .event-staffing-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-app);
    color: var(--text1);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

#screen-event-card .event-staffing-badge.tone-ok {
    border-color: var(--lbl14);
    color: var(--lbl14);
    background: var(--white);
}

#screen-event-card .event-staffing-badge.tone-warn {
    border-color: var(--yellow);
    color: var(--lbl4);
    background: var(--white);
}

#screen-event-card .event-staffing-badge.tone-danger {
    border-color: var(--red);
    color: var(--red);
    background: var(--white);
}

#screen-event-card .event-staffing-empty {
    width: 100%;
    padding: 18px 14px;
    text-align: center;
    border-radius: 12px;
    color: var(--text2);
    font-size: 13px;
}

.event-staffing-modal-overlay {
    position: fixed;
    inset: 0;
    display: block;
    padding: 24px;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 2550;
}

.event-staffing-modal-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

.event-staffing-modal-overlay.hidden {
    display: none;
}

.event-staffing-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(1080px, calc(100vw - 56px));
    height: min(900px, calc(100vh - 40px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--white) 0%, var(--bg-app) 100%);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(-50% + 18px)) scale(0.985);
    transition: transform 0.28s ease, opacity 0.28s ease;
    overflow: hidden;
    z-index: 2551;
    direction: rtl;
    box-sizing: border-box;
}

.event-staffing-modal.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.event-staffing-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 30px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 252, 0.94) 100%);
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    flex: 0 0 auto;
}

.event-staffing-modal-close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.event-staffing-modal-close svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.event-staffing-modal-title {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.event-staffing-modal-header-spacer {
    width: 40px;
    min-width: 40px;
}

.event-staffing-modal-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 24px 30px 28px;
    background: linear-gradient(180deg, rgba(247, 249, 252, 0.86) 0%, rgba(247, 249, 252, 1) 100%);
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.event-staffing-modal-fixed-footer {
    display: none;
    flex: 0 0 auto;
    padding: 0 30px 28px;
    border-top: 1px solid rgba(30, 78, 132, 0.12);
    background: linear-gradient(180deg, rgba(247, 249, 252, 0.96) 0%, var(--bg-app) 100%);
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.07);
}

.event-staffing-modal-fixed-footer:not(.hidden) {
    display: block;
}

.event-staffing-modal.has-fixed-footer .event-staffing-modal-fixed-footer .event-staffing-modal-footer {
    margin-top: 0;
    padding-top: 18px;
    border-top: 0;
    background: transparent;
    position: static;
    bottom: auto;
    z-index: auto;
}

.event-staffing-modal .event-staffing-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100%;
}

.event-staffing-modal .event-staffing-modal-layout {
    gap: 18px;
}

.event-staffing-modal .event-staffing-modal-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    padding: 20px 22px;
    border: 1px solid rgba(30, 78, 132, 0.12);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 252, 0.92) 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.event-staffing-modal .event-staffing-modal-section-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(30, 78, 132, 0.12);
}

.event-staffing-modal .event-staffing-modal-section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.event-staffing-modal .event-staffing-modal-section-subtitle {
    font-size: 13px;
    color: var(--text1);
    line-height: 1.6;
}

.event-staffing-modal .event-staffing-modal-section-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.event-staffing-modal .event-staffing-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.event-staffing-modal .event-staffing-form-grid.event-staffing-form-grid-compact {
    gap: 14px 16px;
}

.event-staffing-modal .event-staffing-form-grid.event-staffing-form-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.event-staffing-modal .event-staffing-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.event-staffing-modal .event-staffing-form-field.is-wide {
    grid-column: 1 / -1;
}

.event-staffing-modal .event-staffing-form-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text1);
    letter-spacing: 0.03em;
    line-height: 1.4;
    padding-inline: 2px;
}

.event-staffing-modal .event-staffing-form-field.is-meta {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 0 0 1px rgba(30, 78, 132, 0.04);
}

.event-staffing-modal .event-staffing-form-field .input,
.event-staffing-modal .event-staffing-form-field .tw-dp-trigger,
.event-staffing-modal .event-staffing-form-field select.input,
.event-staffing-modal .event-staffing-form-field textarea.input {
    width: 100%;
    min-height: 54px;
    padding-inline: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.03);
}

.event-staffing-modal .event-staffing-form-field .tw-date-picker {
    width: 100%;
    min-width: 0;
}

.event-staffing-modal .event-staffing-form-field .tw-dp-trigger {
    justify-content: space-between;
}

.event-staffing-modal .event-staffing-form-field textarea.input {
    min-height: 150px;
    padding-block: 15px;
    resize: vertical;
}

.event-staffing-modal .event-staffing-form-field .input:focus,
.event-staffing-modal .event-staffing-form-field .tw-date-picker.is-open .tw-dp-trigger,
.event-staffing-modal .event-staffing-form-field select.input:focus,
.event-staffing-modal .event-staffing-form-field textarea.input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 78, 132, 0.12);
}

.event-staffing-modal .event-staffing-employee-meta,
.event-staffing-modal .event-staffing-conflicts-host,
.event-staffing-modal .event-staffing-conflicts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text1);
    font-size: 13px;
    line-height: 1.6;
}

.event-staffing-modal .event-staffing-conflict-row {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
}

.event-staffing-modal .event-staffing-modal-error {
    padding: 14px 16px;
    border: 1px solid var(--red);
    border-radius: 16px;
    color: var(--red);
    background: var(--lbl9);
    font-size: 13px;
    font-weight: 600;
}

.event-staffing-modal .event-staffing-modal-toolbar,
.event-staffing-modal .event-staffing-bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.event-staffing-modal .event-staffing-modal-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.event-staffing-modal .event-staffing-modal-toolbar-group.is-secondary {
    margin-inline-start: auto;
}

.event-staffing-modal .event-staffing-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(30, 78, 132, 0.12);
    background: linear-gradient(180deg, rgba(247, 249, 252, 0) 0%, var(--bg-app) 22px, var(--bg-app) 100%);
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.event-staffing-modal .event-staffing-modal-footer-note {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text1);
    padding-inline: 4px;
}

.event-staffing-modal .event-staffing-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 0;
    margin-top: 0;
    position: static;
    z-index: auto;
    background: transparent;
}

.event-staffing-modal .event-staffing-modal-actions .btn {
    min-height: 46px;
    min-width: 140px;
    padding-inline: 20px;
    font-size: 13px;
}

.event-staffing-modal .event-staffing-bulk-toolbar {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.event-staffing-modal .event-staffing-bulk-selection-meta {
    flex: 1 1 200px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text1);
    padding: 12px 16px;
    line-height: 1.5;
    border: 1px dashed rgba(30, 78, 132, 0.18);
    border-radius: 12px;
    background: var(--bg-app);
}

.event-staffing-modal .event-staffing-bulk-list-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 16px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.event-staffing-modal .event-staffing-bulk-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    min-height: 0;
}

.event-staffing-modal .event-staffing-bulk-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    align-content: start;
    grid-auto-rows: max-content;
    max-height: none;
    overflow: visible;
    padding: 0;
}

.event-staffing-modal .event-staffing-bulk-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    align-self: start;
    min-width: 0;
    min-height: 156px;
    padding: 16px 18px;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    background: var(--white);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
    overflow: visible;
    box-sizing: border-box;
}

.event-staffing-modal .event-staffing-bulk-row.has-conflict {
    border-color: var(--lbl4);
    background: linear-gradient(to bottom, var(--white) 50%, rgba(254, 243, 199, 0.18));
}

.event-staffing-modal .event-staffing-bulk-row.is-selected,
.event-staffing-modal .event-staffing-bulk-row:has(.checkbox-input:checked) {
    border-color: var(--primary);
    background: var(--lightblue);
    box-shadow: 0 2px 10px rgba(30, 78, 132, 0.10);
}

.event-staffing-modal .event-staffing-bulk-row-check {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5px;
    flex: 0 0 24px;
}

.event-staffing-modal .event-staffing-bulk-row .checkbox-input {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.event-staffing-modal .event-staffing-bulk-row-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-start;
}

.event-staffing-modal .event-staffing-bulk-row-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(30, 78, 132, 0.12);
    min-width: 0;
}

.event-staffing-modal .event-staffing-bulk-row-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--black);
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    min-width: 0;
}

.event-staffing-modal .event-staffing-bulk-row-status {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    justify-self: end;
}

.event-staffing-modal .event-staffing-bulk-row-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

.event-staffing-modal .event-staffing-bulk-row-meta-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 72px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-app);
    box-sizing: border-box;
}

.event-staffing-modal .event-staffing-bulk-row-meta-item:first-child {
    border-inline-start: 1px solid var(--border);
}

.event-staffing-modal .event-staffing-bulk-row-meta-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text1);
    line-height: 1.2;
}

.event-staffing-modal .event-staffing-bulk-row-meta-value {
    font-size: 14px;
    font-weight: 800;
    color: var(--black);
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
}

.event-staffing-modal .event-staffing-bulk-row-warning {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(254, 243, 199, 0.45);
    border: 1px solid var(--lbl4);
    color: var(--lbl4);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.event-staffing-modal .event-staffing-bulk-result {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(30, 78, 132, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(228, 237, 246, 0.45) 0%, rgba(255, 255, 255, 0.96) 100%);
    box-shadow: none;
}

.event-staffing-modal .event-staffing-bulk-result.hidden {
    display: none;
}

.event-staffing-modal .event-staffing-bulk-result-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-staffing-modal .event-staffing-bulk-result-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
}

.event-staffing-modal .event-staffing-bulk-result-meta {
    font-size: 12px;
    color: var(--text1);
}

.event-staffing-modal .event-staffing-bulk-result-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-staffing-modal .event-staffing-bulk-result-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
}

.event-staffing-modal .event-staffing-bulk-result-text {
    color: var(--text1);
    font-size: 12px;
    line-height: 1.5;
}

.event-staffing-modal .event-staffing-bulk-form .event-staffing-modal-section:last-of-type {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
}

.event-staffing-modal .event-staffing-bulk-form .event-staffing-modal-section:last-of-type .event-staffing-modal-section-head {
    border-bottom: 0;
    padding-bottom: 8px;
}

.event-staffing-modal .event-staffing-bulk-form .event-staffing-modal-section:last-of-type .event-staffing-modal-section-body {
    padding-top: 0;
    overflow: visible;
}

.event-staffing-modal .event-staffing-bulk-form .event-staffing-modal-actions .btn,
.event-staffing-modal .event-staffing-bulk-toolbar .btn {
    min-height: 42px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .event-staffing-modal {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
        background: var(--white);
        transform: translateY(100%);
    }

    .event-staffing-modal.is-open {
        transform: translateY(0);
    }

    .event-staffing-modal-overlay,
    .event-staffing-modal {
        top: 0;
    }

    .event-staffing-modal-overlay {
        padding: 0;
    }

    .event-staffing-modal-header {
        padding: 18px 18px 14px;
    }

    .event-staffing-modal-title {
        font-size: 24px;
    }

    .event-staffing-modal-body {
        gap: 16px;
        padding: 16px 16px 20px;
    }

    .event-staffing-modal-fixed-footer {
        padding: 0 16px 16px;
    }

    .event-staffing-modal .event-staffing-modal-section {
        padding: 16px;
        border-radius: 20px;
        gap: 14px;
    }

    .event-staffing-modal .event-staffing-modal-section-head {
        padding-bottom: 10px;
    }

    .event-staffing-modal .event-staffing-modal-section-title {
        font-size: 18px;
    }

    .event-staffing-modal .event-staffing-form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .event-staffing-modal .event-staffing-form-field {
        gap: 8px;
    }

    .event-staffing-modal .event-staffing-form-field .input,
    .event-staffing-modal .event-staffing-form-field select.input,
    .event-staffing-modal .event-staffing-form-field textarea.input {
        min-height: 48px;
    }

    .event-staffing-modal .event-staffing-form-field textarea.input {
        min-height: 132px;
    }

    .event-staffing-modal .event-staffing-modal-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .event-staffing-modal .event-staffing-modal-actions .btn {
        width: 100%;
        min-width: 0;
        min-height: 48px;
    }

    .event-staffing-modal .event-staffing-modal-toolbar,
    .event-staffing-modal .event-staffing-bulk-toolbar {
        align-items: stretch;
    }

    .event-staffing-modal .event-staffing-modal-toolbar-group,
    .event-staffing-modal .event-staffing-modal-toolbar-group.is-secondary {
        width: 100%;
        margin-inline-start: 0;
    }

    .event-staffing-modal .event-staffing-modal-footer {
        gap: 10px;
        padding-top: 16px;
    }

    .event-staffing-modal .event-staffing-bulk-selection-meta {
        width: 100%;
        flex-basis: 100%;
    }

    .event-staffing-modal .event-staffing-bulk-grid {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .event-staffing-modal .event-staffing-bulk-row {
        padding: 14px 16px;
        border-radius: 14px;
    }

    .event-staffing-modal .event-staffing-bulk-row-head {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .event-staffing-modal .event-staffing-bulk-row-meta {
        grid-template-columns: 1fr;
    }

    .event-staffing-modal .event-staffing-bulk-row-meta-item {
        min-height: 0;
        border-top: 1px solid var(--border);
    }

    .event-staffing-modal .event-staffing-bulk-row-meta-item:first-child {
        border-top: 1px solid var(--border);
        border-inline-start: 1px solid var(--border);
    }

    #screen-event-card .event-staffing-table > .table-head {
        display: none;
    }

    #screen-event-card .event-staffing-table-wrap {
        overflow: visible;
    }

    #screen-event-card .event-staffing-table {
        min-width: 0;
    }

    #screen-event-card .event-staffing-assignments-table {
        min-width: 0;
    }

    #screen-event-card .event-staffing-table > .table-body {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    #screen-event-card .event-staffing-table > .table-body > .table-row {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px !important;
        padding: 18px 16px !important;
        padding-inline-start: 16px !important;
        border: 1px solid var(--border) !important;
        border-radius: 22px !important;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 252, 0.94) 100%) !important;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
    }

    #screen-event-card .event-staffing-table > .table-body > .table-row > div {
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        flex-direction: column;
        gap: 6px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        min-width: 0;
        box-shadow: none;
        margin: 0;
    }

    #screen-event-card .event-staffing-table > .table-body > .table-row > div::before {
        content: attr(data-label);
        color: var(--text1);
        font-size: 10px;
        font-weight: 700;
        line-height: 1.3;
        letter-spacing: 0.03em;
        flex: 0 0 auto;
        opacity: 0.82;
    }

    #screen-event-card .event-staffing-table > .table-body > .table-row > div > .event-staffing-badge {
        align-self: flex-start;
    }

    #screen-event-card .event-staffing-row {
        padding-inline-start: 16px;
    }

    #screen-event-card .event-staffing-card-title {
        grid-column: 1 / -1;
        gap: 5px;
        padding: 0 0 14px;
        border: 0;
        border-bottom: 1px solid rgba(30, 78, 132, 0.12);
        border-radius: 0;
        background: transparent;
    }

    #screen-event-card .event-staffing-card-title::before,
    #screen-event-card .event-staffing-card-footer::before {
        display: none;
    }

    #screen-event-card .event-staffing-card-kicker {
        display: block;
        color: var(--text1);
        font-size: 10px;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: 0.03em;
        opacity: 0.72;
    }

    #screen-event-card .event-staffing-card-title-text {
        color: var(--primary);
        font-size: 20px;
        font-weight: 800;
        line-height: 1.25;
        letter-spacing: -0.01em;
    }

    #screen-event-card .event-staffing-card-subtitle {
        grid-column: 1 / -1;
        gap: 4px;
        margin-top: -2px;
        color: var(--text1);
    }

    #screen-event-card .event-staffing-card-subtitle-text {
        font-size: 15px;
        font-weight: 700;
        line-height: 1.45;
    }

    #screen-event-card .event-staffing-card-time {
        grid-column: 1 / -1;
        gap: 6px;
        padding: 12px 14px;
        border: 1px solid rgba(30, 78, 132, 0.08);
        border-radius: 18px;
        background: rgba(228, 237, 246, 0.4);
    }

    #screen-event-card .event-staffing-card-time::before {
        color: var(--primary);
        opacity: 0.86;
    }

    #screen-event-card .event-staffing-card-time-text {
        color: var(--black);
        font-size: 15px;
        font-weight: 800;
        line-height: 1.45;
    }

    #screen-event-card .event-staffing-card-stat {
        gap: 8px;
        min-height: 88px;
        padding: 14px;
        border: 1px solid var(--border-soft);
        border-radius: 14px;
        background: var(--white);
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    }

    #screen-event-card .event-staffing-card-stat::before {
        color: var(--text1);
        opacity: 0.82;
    }

    #screen-event-card .event-staffing-card-value {
        color: var(--black);
        font-size: 23px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: -0.02em;
    }

    #screen-event-card .event-staffing-card-stat.is-balance {
        justify-content: space-between;
        background: var(--lightblue);
        border-color: var(--primary);
    }

    #screen-event-card .event-staffing-card-stat.is-balance::before {
        color: var(--primary);
    }

    #screen-event-card .event-staffing-card-stat.is-balance .event-staffing-badge {
        min-height: 32px;
        padding-inline: 12px;
        font-size: 13px;
    }

    #screen-event-card .event-staffing-card-meta {
        gap: 8px;
        min-height: 74px;
        padding: 12px 14px;
        border: 1px solid var(--border-soft);
        border-radius: 14px;
        background: var(--white);
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    }

    #screen-event-card .event-staffing-card-meta.is-actual {
        min-height: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: var(--text1);
    }

    #screen-event-card .event-staffing-card-meta.is-actual::before {
        opacity: 0.74;
    }

    #screen-event-card .event-staffing-card-meta-text {
        color: var(--text1);
        font-size: 14px;
        font-weight: 700;
        line-height: 1.45;
    }

    #screen-event-card .event-staffing-card-meta.is-pay .event-staffing-card-meta-text {
        color: var(--black);
    }

    #screen-event-card .event-staffing-card-meta.is-status .event-staffing-badge,
    #screen-event-card .event-staffing-card-meta.is-conflict .event-staffing-badge {
        min-height: 32px;
        padding-inline: 12px;
        font-size: 13px;
    }

    #screen-event-card .event-staffing-card-meta.is-conflict {
        background: rgba(247, 249, 252, 0.88);
    }

    #screen-event-card .event-staffing-card-notes {
        grid-column: 1 / -1;
        gap: 6px;
        padding-top: 2px;
        line-height: 1.6;
        color: var(--text1);
    }

    #screen-event-card .event-staffing-card-notes-text {
        color: var(--text1);
        font-size: 14px;
        line-height: 1.7;
        opacity: 0.9;
    }

    #screen-event-card .event-staffing-requirements-row {
        grid-template-areas:
            "title title title"
            "required assigned balance"
            "notes notes notes"
            "actions actions actions";
    }

    #screen-event-card .event-staffing-requirements-row .event-staffing-card-title {
        grid-area: title;
    }

    #screen-event-card .event-staffing-requirements-row .event-staffing-card-stat.is-required {
        grid-area: required;
    }

    #screen-event-card .event-staffing-requirements-row .event-staffing-card-stat.is-assigned {
        grid-area: assigned;
    }

    #screen-event-card .event-staffing-requirements-row .event-staffing-card-stat.is-balance {
        grid-area: balance;
    }

    #screen-event-card .event-staffing-requirements-row .event-staffing-card-notes {
        grid-area: notes;
    }

    #screen-event-card .event-staffing-requirements-row .event-staffing-card-footer {
        grid-area: actions;
    }

    #screen-event-card .event-staffing-assignments-table > .table-body > .event-staffing-assignments-row,
    #screen-event-card .event-staffing-assignments-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-areas:
            "title title"
            "role role"
            "planned planned"
            "status pay"
            "actual conflict"
            "actions actions" !important;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-title {
        grid-area: title;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-subtitle {
        grid-area: role;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-time {
        grid-area: planned;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta.is-actual {
        grid-area: actual;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta.is-status {
        grid-area: status;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta.is-pay {
        grid-area: pay;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta.is-conflict {
        grid-area: conflict;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-footer {
        grid-area: actions;
    }

    #screen-event-card .event-staffing-card-footer {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 10px;
        padding: 16px 0 0;
        margin-top: 4px;
        border: 0;
        border-top: 1px solid rgba(30, 78, 132, 0.12);
        border-radius: 0;
        background: transparent;
        justify-content: stretch;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-footer {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    #screen-event-card .event-staffing-card-footer .btn {
        flex: none;
        width: 100%;
        min-width: 0;
        min-height: 46px;
        max-height: none;
        padding: 0 14px;
        border-radius: 12px;
        justify-content: center;
        align-items: center;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-footer > .btn:first-child {
        grid-column: 1;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-footer > .btn {
        grid-column: 1;
    }

    #screen-event-card .event-staffing-requirements-row .event-staffing-card-footer {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 6px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        min-width: 0;
        margin-top: 2px;
        border-top: 1px solid rgba(30, 78, 132, 0.12);
        padding-top: 14px;
    }

    #screen-event-card .event-staffing-requirements-row .event-staffing-card-footer > .btn {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        flex: 1 1 0;
        gap: 6px;
        min-width: 0;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-title,
    #screen-event-card .event-staffing-assignments-row .event-staffing-card-subtitle,
    #screen-event-card .event-staffing-assignments-row .event-staffing-card-time,
    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta,
    #screen-event-card .event-staffing-assignments-row .event-staffing-card-footer {
        width: 100%;
        box-sizing: border-box;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-title {
        padding-bottom: 12px;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-subtitle {
        margin-top: 0;
        padding-top: 0;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-time,
    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta {
        min-height: 82px;
        padding: 12px 14px;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 8px;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-time {
        border-radius: 16px;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta.is-actual {
        min-height: 82px;
        padding: 12px 14px;
        border: 1px solid var(--border-soft);
        border-radius: 14px;
        background: var(--white);
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
        color: var(--text1);
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta.is-actual::before {
        opacity: 0.82;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta.is-status,
    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta.is-pay,
    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta.is-conflict {
        justify-content: space-between;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta.is-status .event-staffing-badge,
    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta.is-conflict .event-staffing-badge {
        align-self: flex-start;
        max-width: 100%;
    }

    #screen-event-card .event-staffing-assignments-row .event-staffing-card-meta-text,
    #screen-event-card .event-staffing-assignments-row .event-staffing-card-time-text,
    #screen-event-card .event-staffing-assignments-row .event-staffing-card-subtitle-text {
        word-break: break-word;
    }
}

/* Quote/Contract: centered print-like preview modal (Chrome-like) */
.documents-editor-container.print-preview-modal .editor-topbar {
    padding: .75rem 1rem;
    margin-bottom: 0;
}

.documents-editor-container.print-preview-modal h3.editor-title {
    margin: 0;
}

@media (max-width: 767px) {
    .documents-editor-container.print-preview-modal .editor-topbar .editor-title {
        padding-inline-start: 12px;
    }
}

@media (min-width: 768px) {
    /* Ensure the issue overlay sits above the Event Card editor */
    .ui-overlay.event-card-doc-overlay {
        inset: 0;
        background: rgba(30, 78, 132, 0.58);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 2550;
    }

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

    .documents-editor-container.print-preview-modal {
        top: 50%;
        left: 50%;
        width: 88.5%;
        height: calc(100vh - 32px);
        max-width: none;
        max-height: 980px;
        transform: translate(-50%, -50%);
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
        overflow: visible;
        background: var(--white);
        border: 0;
    }

    #documents-issue-modal .modal-close,
    .documents-editor-container.print-preview-modal .modal-close {
        position: absolute;
        top: 6px;
        left: 24px;
        width: 44px;
        height: 44px;
        padding: 0;
        font-size: 30px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid var(--border-soft);
        border-radius: 999px;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
        color: var(--text1);
        cursor: pointer;
        z-index: 8;
    }

    #documents-issue-modal #docIssueSubmitBtn {
        margin-left: 80px;
    }

    .documents-editor-container.print-preview-modal .modal-close:hover {
        color: var(--red);
    }

    .documents-editor-container.print-preview-modal.event-menu-doc-modal .event-menu-modal-save-btn {
        position: absolute;
        top: 18px;
        left: 74px;
        z-index: 5;
        min-height: 34px;
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 8px;
    }

    .documents-editor-container.print-preview-modal.is-open {
        transform: translate(-50%, -50%);
        z-index: 2600;
        padding-bottom: 0;
        overflow: visible;
    }

    .documents-editor-container.print-preview-modal .editor-topbar {
        background: var(--white);
        border-bottom: 1px solid var(--border-soft);
        position: relative;
        margin-bottom: 0;
    }

    .documents-editor-container.print-preview-modal .editor-topbar .editor-title {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        padding: 0;
        font-size: clamp(16px, 2vw, 18px);
        line-height: 1.2;
        text-align: center;
        max-width: calc(100% - 160px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        pointer-events: none;
    }

    .documents-editor-container.print-preview-modal .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: inherit;
        padding: 0;
        margin: 0;
        gap: 0;
    }

    .documents-editor-container.print-preview-modal .toolbar {
        flex: 0 0 auto;
        display: flex;
        gap: 10px;
        justify-content: flex-start; /* left */
        align-items: center;
        margin-top: auto;
        padding: 8px 16px;
        background: var(--white);
        border: 0;
        direction: ltr; /* keep actions on the left in RTL pages */
    }

    .documents-editor-container.print-preview-modal .order-doc-split {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: row; /* RTL: first pane (edit) stays on the right */
        direction: rtl;
        gap: 0;
        padding: 0;
        box-sizing: border-box;
        background: transparent;
    }

    /* Helper row above split view: makes it clear what each side is for */
    .documents-editor-container.print-preview-modal .order-doc-hint-row {
        flex: 0 0 auto;
        display: flex;
        flex-direction: row;
        direction: rtl;
        gap: 0;
        padding: 10px 16px;
        border-bottom: 1px solid var(--border-soft);
        background: var(--white);
    }

    .documents-editor-container.print-preview-modal .order-doc-hint-col {
        min-width: 0;
        padding: 0 12px;
    }

    .documents-editor-container.print-preview-modal .order-doc-hint-edit {
        flex: 0 0 560px;
    }

    .documents-editor-container.print-preview-modal .order-doc-hint-preview {
        flex: 1 1 auto;
        border-inline-start: 1px solid var(--border-soft);
    }

    .documents-editor-container.print-preview-modal .order-doc-hint-title {
        font-weight: 800;
        color: var(--text1);
        font-size: 13px;
        margin-bottom: 2px;
    }

    .documents-editor-container.print-preview-modal .order-doc-hint-text {
        color: var(--text1);
        font-size: 12px;
        line-height: 1.35;
        opacity: 0.9;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit {
        flex: 0 0 40%;
        min-height: 0;
        overflow: auto;
        background: transparent;
        border: 0;
        border-radius: 0;
        padding: 12px 3%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .documents-editor-container.print-preview-modal .order-doc-preview {
        flex: 0 0 60%;
    }

    /* Option (2): edit panel should feel like the document blocks */
    .documents-editor-container.print-preview-modal .order-doc-edit .comments-box {
        margin: 0 0 30px;
        background: transparent;
        border: 0;
        border-radius: 0;
        padding: 0;
        box-sizing: border-box;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .comments-box:has(.order-table) {
        margin-bottom: 0;
        padding-bottom: 0;
        position: relative;
        top: -2px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .comments-box:has(.doc-kv) {
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .comments-box:has(.order-summary-wrap) {
        margin-bottom: 15px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .comments-box:has(.richtext-editor) > .editor-title {
        padding-bottom: 5px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .comments-box:has(.doc-kv) > .editor-title {
        color: var(--black) !important;
        padding-bottom: 0;
        margin-bottom: 1px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .comments-box .editor-title {
        margin: 0 0 4px;
        padding: 0;
        border-bottom: none;
        color: var(--black);
        font-weight: 700;
        font-size: 14px;
        line-height: 1.2;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .font-sml {
        color: var(--text2);
        font-size: 13px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .richtext-editor {
        font-size: 14px;
        line-height: 1.5;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .richtext-wrap:not(:has(.richtext-toolbar)) {
        overflow: hidden;
        border-radius: 10px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .richtext-wrap:not(:has(.richtext-toolbar)) .richtext-editor {
        border-radius: 10px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .richtext-editor:empty::before {
        font-size: 14px;
    }

    /* Key/Value grid used inside edit panel */
    .documents-editor-container.print-preview-modal .order-doc-edit .doc-kv {
        font-size: 13px;
    }
    .documents-editor-container.print-preview-modal .order-doc-edit .doc-info-line {
        color: var(--black);
        font-weight: 600;
        white-space: nowrap;
    }

    /* Order lines table inside edit panel */
    .documents-editor-container.print-preview-modal .order-doc-edit .order-table {
        border: 1px solid var(--border-soft);
        border-radius: 14px;
        overflow: hidden;
        background: var(--bg-app);
        margin-top: 0;
        padding-top: 0;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-head {
        background: transparent;
        border-bottom: 1px solid var(--border-soft);
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-head.lines-grid {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-head-cell {
        font-size: 12px;
        font-weight: 700;
        color: var(--text2);
        padding: 8px 6px;
        text-align: center;
        justify-content: center;
        background: transparent !important;
        border-inline: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
    }

    /* Order lines grid: description, qty, price, delete */
    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-head.lines-grid,
    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-row.lines-grid {
        grid-template-columns: 2.5fr 0.6fr 0.75fr 40px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-row {
        border-bottom: 1px solid var(--border-soft);
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-row.lines-grid {
        padding-top: 0;
        padding-bottom: 0;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-row:last-child {
        border-bottom: 0;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-cell {
        padding: 4px 6px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-row.lines-grid .order-table-cell {
        border: 0 !important;
        border-inline: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-cell .total-cell {
        text-align: left;
        font-weight: 700;
        color: var(--black);
        white-space: nowrap;
        font-size: 12px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-delete-cell {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-delete-cell .btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        padding: 0;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff0f0;
        border: 1px solid #ffd4d4;
        color: #d44;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-delete-cell .btn svg {
        stroke: #d44;
        width: 14px;
        height: 14px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-delete-cell .btn:hover {
        background: #d44;
        border-color: #d44;
        color: #fff;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-delete-cell .btn:hover svg {
        stroke: #fff;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-cell .input {
        height: 28px;
        font-size: 13px;
        padding: 4px 8px;
        border-radius: 8px;
        background-color: var(--white) !important;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-cell .input[type="number"]::-webkit-outer-spin-button,
    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-cell .input[type="number"]::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-cell .input[type="number"],
    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-cell .input[inputmode="decimal"] {
        -moz-appearance: textfield;
        appearance: textfield;
        text-align: center;
    }

    /* Totals ("סה"כ") inside document edit panel: match Event Card order tab styling */
    .documents-editor-container.print-preview-modal .order-doc-edit .order-summary-wrap {
        max-width: 190px;
        margin-right: auto;
        margin-left: 0;
        margin-top: 0;
        padding-top: 0;
        background: var(--bg-app);
        border: 1px solid var(--border-soft);
        border-radius: 6px;
        padding: 5px 8px;
        padding-bottom: 2.5px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .leads-history-row.order-summary-row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
        background: transparent;
        margin: 0;
        padding: 4px 0;
        border-radius: 0;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-summary-row .leads-history-meta {
        color: var(--black);
        font-weight: 400;
        font-size: 11.5px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-summary-row .leads-history-text {
        text-align: left;
        font-weight: 400;
        font-size: 11.5px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-summary-row.grand-total .leads-history-meta,
    .documents-editor-container.print-preview-modal .order-doc-edit .order-summary-row.grand-total .leads-history-text {
        color: var(--black);
        font-weight: 700;
    }

    /* Invitees editor row alignment */
    .documents-editor-container.print-preview-modal .order-doc-edit .phones-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .doc-invitee-block {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
        width: 100%;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .doc-invitee-block + .doc-invitee-block {
        margin-top: 6px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .doc-invitee-block .input {
        width: 100%;
        min-width: 0;
        height: 30px;
        border-radius: 10px;
        font-size: 13px;
        padding: 4px 10px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .phone-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        align-items: center;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .phone-side {
        display: grid;
        grid-template-columns: 1fr 30px;
        gap: 8px;
        align-items: center;
        flex: 1;
        min-width: 0;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .phone-row .input {
        height: 30px; /* ~30% shorter than 42px */
        border-radius: 10px;
        font-size: 13px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .phone-delete {
        width: 27px;
        height: 27px;
        min-width: 27px;
        min-height: 27px;
        padding: 0;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--delete);
        border: 1px solid transparent;
        color: var(--white);
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .phone-delete svg {
        width: 14px;
        height: 14px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .phone-delete:hover {
        background: var(--delete-hover);
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .editor-actions {
        margin-top: 10px;
        display: flex;
        justify-content: flex-start;
        direction: ltr;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .phones-editor + .editor-actions .btn {
        width: 27px;
        height: 27px;
        min-width: 27px;
        min-height: 27px;
        padding: 0;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .phones-editor + .editor-actions .btn svg {
        width: 14px;
        height: 14px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table + .editor-actions .btn {
        width: 27px;
        height: 27px;
        min-width: 27px;
        min-height: 27px;
        padding: 0;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table + .editor-actions .btn svg {
        width: 14px;
        height: 14px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit textarea.input {
        min-height: 120px;
        resize: vertical;
        border-radius: 12px;
    }

    .documents-editor-container.print-preview-modal .order-doc-preview {
        flex: 0 0 60%;
        min-width: 0;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        background: #ecedf1;
        border: 0;
        border-radius: 0;
        padding: 16px 0;
    }

    /* Split-view divider (desktop): keep UI minimal but readable */
    .documents-editor-container.print-preview-modal:not(.is-doc-preview):not(.is-doc-edit) .order-doc-preview {
        border-inline-start: none;
    }

    .documents-editor-container.print-preview-modal .order-doc-preview iframe {
        width: 70%;
        min-height: 500px;
        border: 0;
        display: block;
        margin: 0 auto;
        background: var(--white);
        box-shadow: 0 1px 6px rgba(0,0,0,0.12);
        border-radius: 4px;
        overflow: hidden;
        transition: height 0.15s ease;
        scrollbar-width: none;
    }

    .documents-editor-container.print-preview-modal .order-doc-preview iframe::-webkit-scrollbar {
        display: none;
    }

    .documents-editor-container.print-preview-modal .order-doc-biz-preview {
        border: 0;
        border-radius: 0;
        overflow: hidden;
        background: var(--white);
    }

    .documents-editor-container.print-preview-modal .order-doc-biz-preview iframe {
        width: 100%;
        height: 190px;
        border: 0;
        display: block;
        background: var(--white);
    }
}

@media (max-width: 1024px) {
    .documents-editor-container.print-preview-modal .order-doc-split {
        flex-direction: column;
        gap: 12px;
    }

    .documents-editor-container.print-preview-modal .order-doc-hint-row {
        flex-direction: column;
        gap: 8px;
    }

    .documents-editor-container.print-preview-modal .order-doc-hint-edit {
        flex: 0 0 auto;
    }

    .documents-editor-container.print-preview-modal .order-doc-hint-preview {
        border-inline-start: 0;
        border-top: 1px solid var(--border-soft);
        padding-top: 8px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit {
        flex: 0 0 auto;
        min-width: 0;
    }

    .documents-editor-container.print-preview-modal:not(.is-doc-preview):not(.is-doc-edit) .order-doc-preview {
        border-inline-start: 0;
    }
}

/* Event Card: icon-only action buttons (add / delete) – always square */
#screen-event-card .order-btn-add,
#screen-event-card .btn-sml,
#screen-event-card .phone-delete,
#screen-event-card .btn-delete,
#screen-event-card .order-line-delete {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-soft);
    background: var(--white);
    color: var(--text2);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    flex-shrink: 0;
}

#screen-event-card .order-btn-add:hover,
#screen-event-card .btn-sml:hover,
#screen-event-card .phone-delete:hover,
#screen-event-card .btn-delete:hover,
#screen-event-card .order-line-delete:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: none;
}

#screen-event-card .order-btn-add svg,
#screen-event-card .btn-sml svg,
#screen-event-card .phone-delete svg,
#screen-event-card .btn-delete svg,
#screen-event-card .order-line-delete svg {
    width: 16px;
    height: 16px;
}

/* Plus (+) buttons: always primary with bright white icon */
#screen-event-card .order-btn-add,
#screen-event-card .add-phone {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

#screen-event-card .order-btn-add svg,
#screen-event-card .add-phone svg {
    width: 12.8px;
    height: 12.8px;
    stroke: #fff !important;
    color: #fff !important;
    opacity: 1 !important;
}

/* Inside form-section: same height as inputs */
#screen-event-card .form-section .add-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33.6px;
    height: 33.6px;
    min-width: 33.6px;
    min-height: 33.6px;
    padding: 0;
    line-height: 1;
    border-radius: 10px;
}

#screen-event-card .order-btn-add:hover,
#screen-event-card .add-phone:hover {
    opacity: 0.85;
}

/* Delete buttons: same height as inputs */
#screen-event-card .form-section .phone-delete,
#screen-event-card .form-section .btn-delete {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 10px;
    background: #fff0f0;
    border-color: #ffd4d4;
    color: #d44;
}

#screen-event-card .form-section .phone-delete svg,
#screen-event-card .form-section .btn-delete svg {
    stroke: #d44;
}

#screen-event-card .form-section .phone-delete:hover,
#screen-event-card .form-section .btn-delete:hover {
    background: #d44;
    border-color: #d44;
    color: #fff;
}

#screen-event-card .form-section .phone-delete:hover svg,
#screen-event-card .form-section .btn-delete:hover svg {
    stroke: #fff;
}

/* File field layout in event card editor */
#screen-event-card .dyn-file {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow: visible;
}

#screen-event-card .field:has(.dyn-file) > div:not(.field-error),
.event-editor .form-grid .form-tab-panel .field:has(.dyn-file) > div:not(.field-error) {
    overflow: visible;
}

#screen-event-card .dyn-file > span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Main file picker button: wide, primary, white text */
#screen-event-card .dyn-file > button.btn-sml:not(.btn-delete):not(.dyn-file-actions-trigger) {
    width: auto;
    min-width: 120px;
    height: 36px;
    padding: 0 20px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

#screen-event-card .dyn-file > .dyn-file-actions-wrap {
    position: relative;
    flex: 0 0 30px;
}

#screen-event-card .dyn-file > .dyn-file-actions-wrap > .dyn-file-actions-trigger {
    flex: 0 0 30px;
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    padding: 0;
}

#screen-event-card .dyn-file-actions-menu.user-menu-dropdown {
    top: calc(100% + 4px);
    left: 0;
    right: auto;
    min-width: 120px;
    z-index: 20;
}

#screen-event-card .dyn-file-action-item.user-menu-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: right;
    cursor: pointer;
    font: inherit;
    font-size: 16px;
}

#screen-event-card .dyn-file-action-item.user-menu-link svg {
    flex: 0 0 16px;
}

#screen-event-card .dyn-file-action-item.user-menu-link span {
    flex: 0 1 auto;
}

#screen-event-card .dyn-file-action-delete.user-menu-link {
    color: #d44;
}

@media (max-width: 900px) {
    /* Mobile: open panels should fill the screen but keep the global header visible */
    #screen-event-card .event-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-event-card .event-editor-container.is-open .event-editor > .editor-actions {
        width: 100%;
        right: 0;
    }

    #event-card-overlay.ui-overlay {
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        height: 100vh;
    }

    .event-editor-topbar-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    /* Event editor mobile - slide from bottom like leads */
    .event-editor-container {
        transform: translateY(100%);
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        scrollbar-width: none;
        background: var(--bg-mobile);
    }

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

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

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

    .event-editor {
        scrollbar-width: none;
    }

    .event-editor::-webkit-scrollbar {
        display: none;
    }

    .event-mobile-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: var(--primary);
        color: var(--white);
        padding: 20px 24px;
        padding-top: max(20px, env(safe-area-inset-top));
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 1000;
        flex-shrink: 0;
        min-height: 65px;
        max-height: 65px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .event-mobile-header h1 {
        font-size: 18px;
        font-weight: 400;
        margin: 0;
        flex: 1;
        text-align: right;
        direction: rtl;
        order: 2;
    }

    .event-mobile-header h1 .edit-pen {
        width: 0.8em;
        height: 0.8em;
    }

    .event-mobile-header h1.event-mobile-title-details {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        line-height: 1.15;
        gap: 2px;
    }

    .event-mobile-header h1 .event-mobile-title-owner {
        display: block;
        width: 100%;
        text-align: right;
        font-size: 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .event-mobile-header h1 .event-mobile-title-meta {
        display: block;
        width: 100%;
        text-align: right;
        font-size: 12px;
        font-weight: 400;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .event-mobile-close-btn {
        background: none;
        border: none;
        color: var(--white);
        cursor: pointer;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        flex-shrink: 0;
        order: 3;
    }

    .event-mobile-close-btn svg {
        stroke: var(--gray);
        width: 30px;
        height: 30px;
        stroke-width: 2;
    }

    .event-mobile-header-spacer {
        width: 26px;
        height: 26px;
        order: 1;
    }

    /* Hide desktop topbar on mobile */
    .event-editor .editor-topbar {
        display: none;
    }

    /* Fix multi-select dropdown on mobile - prevent clipping */
    .event-editor-container.is-open .multi-select-panel {
        position: fixed;
        z-index: 10000;
        max-height: 50vh;
        top: auto;
        left: 2rem;
        right: 2rem;
        width: auto !important;
    }
}

/* Multi-select panel: absolute so it floats and doesn't push content */
#screen-event-card .multi-select {
    position: relative;
}

#screen-event-card .multi-select-panel {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 100;
    direction: rtl;
}

#screen-event-card .multi-select-panel.is-collapsed {
    display: none;
}

#screen-event-card .multi-select-option {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: .5rem;
    font-size: 13px;
    width: 100%;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

#screen-event-card .multi-select-option.active {
    background: var(--primary-1);
    color: var(--primary);
}

/* Let the multi-select dropdown escape its field wrapper */
#screen-event-card .field:has(.multi-select) > div:not(.field-error) {
    overflow: visible !important;
}

/* Let the date picker popover escape its field wrapper (renderInPlace) */
#screen-event-card .field:has(.tw-date-picker) > div:not(.field-error) {
    overflow: visible !important;
}

/* Smaller validation errors inside Event Card */
#screen-event-card .field-error {
    font-size: 13px;
    line-height: 1.25;
}

@media (max-width: 767px) {
    .event-editor .form-grid .form-tab-panel {
        gap: 1rem;
    }

    #screen-event-card .section-title {
        border-bottom: 0;
    }

    .event-editor .form-grid .form-tab-panel .field>div:not(.field-error) {
        display: flex;
        flex-direction: column;
        align-self: flex-start;
        border: 1px solid var(--border-soft);
        background: var(--white);
        padding: 1rem;
        border-radius: 1rem;
        gap: .5rem;
        overflow: hidden;
        width: 100%;
        box-sizing: border-box;
        box-shadow: rgba(219, 219, 219, 0.25) 0px 4px 4px 0px;
    }

    .event-editor .form-grid .form-tab-panel .field.required-field>div {
        align-items: self-start;
    }

    #screen-event-card .label {
        font-weight: 500;
        background: none;
        padding: 0;
        text-align: right;
        border-color: transparent;
        border-radius: unset;
        width: auto;
        max-width: unset;
    }

    #screen-event-card .field-phone {
        margin-top: 0;
    }

    #screen-event-card input,
    #screen-event-card select,
    #screen-event-card textarea {
        border: 1px solid var(--border-soft);
        border-radius: .5rem;
        padding: .25rem .5rem;
        width: 100% !important;
        background-color: var(--lightgray);
    }
}

@media (min-width: 768px) {
    .event-editor-desktop-wrapper {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 25px;
        padding: 30px;
        max-width: 100%;
    }

    .event-editor-desktop-wrapper.event-editor-desktop-wrapper-no-side {
        grid-template-columns: 1fr;
    }

    .event-editor .form-tabs-nav {
        display: none;
    }

    .event-editor-main-column {
        display: flex;
        flex-direction: column;
        gap: 25px;
    }

    .event-editor-side-column {
        display: flex;
        flex-direction: column;
        gap: 25px;
    }

    .event-financial-row {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 15px;
        width: 100%;
        padding: 30px;
        box-sizing: border-box;
    }

    .event-fin-widget {
        background: var(--white);
        border: 1px solid var(--border-soft);
        border-radius: 14px;
        padding: 14px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-width: 0;
        position: relative;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    }

    .event-fin-label {
        font-size: 13px;
        color: var(--text2);
        font-weight: 600;
    }

    .event-fin-amount {
        font-size: 20px;
        font-weight: 700;
        color: var(--black);
    }

    .event-fin-amount.green {
        color: var(--lbl1);
    }

    .event-fin-amount.orange {
        color: var(--lbl4);
    }

    .event-desktop-header {
        background: var(--white);
        border-bottom: 1px solid var(--border-soft);
        padding: 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 0;
        position: sticky;
        top: 0;
        z-index: 5;
    }

    .event-desktop-header-left {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .event-desktop-back-link {
        font-size: 13px;
        color: var(--text2);
        display: flex;
        align-items: center;
        gap: 5px;
        cursor: pointer;
        margin-bottom: 5px;
        background: transparent;
        border: none;
        padding: 0;
        text-align: right;
    }

    .event-desktop-title {
        font-size: 24px;
        font-weight: 800;
        color: var(--primary);
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .event-desktop-meta {
        font-size: 14px;
        color: var(--text2);
        margin-top: 2px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .event-desktop-meta svg {
        color: var(--text1);
        vertical-align: middle;
        flex-shrink: 0;
    }

    .event-desktop-meta-sep {
        color: var(--border);
        margin: 0 2px;
    }

    .event-desktop-header-actions {
        display: flex;
        gap: 10px;
    }

    .event-desktop-tabs-container {
        display: flex;
        border-bottom: 1px solid var(--border-soft);
        background: var(--white);
        padding: 0 20px;
        height: 54px;
        align-items: center;
        flex-shrink: 0;
        gap: 0;
        margin: 0;
        box-sizing: border-box;
        overflow-x: auto;
        overflow-y: hidden;
    }

    /* Tabs inside the main card should look like the provided design */
    .event-card-section .event-desktop-tabs-container {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    .event-desktop-tab-item {
        padding: 15px 25px;
        cursor: pointer;
        color: var(--text2);
        font-weight: 500;
        font-size: 14px;
        position: relative;
        transition: color 0.2s ease;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
    }

    .event-desktop-tab-item:hover {
        color: var(--primary);
    }

    .event-desktop-tab-item.tab-disabled {
        opacity: 0.4;
        pointer-events: none;
        cursor: default;
    }

    .event-desktop-tab-item.active {
        color: var(--white);
        background: var(--primary);
        font-weight: 500;
        font-size: 16px;
        border-radius: 18px;
        margin: 9px 0;
        padding: 6px 25px;
    }

    .event-desktop-tab-item.active::after {
        content: none;
    }

    .event-schedule-tab-dot {
        display: none;
    }

    .event-schedule-tab-dot[data-schedule-type="1"] {
        background: var(--lbl1);
    }

    .event-schedule-tab-dot[data-schedule-type="2"] {
        background: var(--lbl2);
    }

    .event-schedule-tab-dot[data-schedule-type="3"] {
        background: var(--delete);
    }

    .event-schedule-tab-dot[data-schedule-type="4"] {
        background: var(--lbl5);
    }

    .event-schedule-tab-dot[data-schedule-type="5"] {
        background: var(--dark-gray);
    }

    .event-card-section {
        background: var(--white);
        border-radius: 16px;
        box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
        border: 1px solid var(--border-soft);
        padding: 0;
        overflow: hidden;
    }

    .event-card-section .form-grid {
        padding: 0;
        margin: 0;
    }

    /* The tab panels handle padding via .content-scroll; avoid double padding */
    .event-card-section .form-tabs-content {
        padding: 0;
        box-sizing: border-box;
    }

    .event-card-section .form-grid .field {
        display: block;
    }

    .event-card-section-title {
        font-size: 16px;
        font-weight: 700;
        color: var(--black);
        margin-bottom: -1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        grid-column: 1 / -1;
    }

    .event-collapsible-title {
        cursor: pointer;
        background: var(--white);
        border: 1px solid var(--border-soft);
        padding: .75rem 1rem;
        width: 100%;
        text-align: right;
        border-radius: .75rem;
        margin: 0 0 .75rem;
    }

    .event-collapsible-title::after {
        content: '';
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--text2);
        border-bottom: 2px solid var(--text2);
        transform: rotate(45deg);
        transition: transform 0.2s ease;
        display: inline-block;
    }

    .event-collapsible-title.is-open {
        border-color: var(--primary);
    }

    .event-collapsible-title.is-open::after {
        transform: rotate(-135deg);
    }

    .event-schedule-body {
        display: contents;
    }

    .event-schedule-area {
        display: contents;
    }

    .event-schedule-summary {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        background: var(--white);
        border: 1px solid var(--border-soft);
        border-radius: .75rem;
        padding: .75rem 1rem;
        margin: .25rem 0 .75rem;
        box-sizing: border-box;
    }

    .event-schedule-summary-left {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .event-schedule-summary-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        font-weight: 700;
        color: var(--black);
    }

    .event-schedule-status-badge {
        font-size: 12px;
        font-weight: 700;
        padding: 3px 10px;
        border-radius: 999px;
        border: 1px solid var(--border-soft);
        color: var(--text2);
        background: var(--white);
        flex: 0 0 auto;
    }

    .event-schedule-status-badge.is-none {
        border-color: var(--border-soft);
        color: var(--text2);
    }

    .event-schedule-status-badge.is-existing {
        border-color: var(--lbl1);
        color: var(--lbl1);
    }

    .event-schedule-status-badge.is-creating {
        border-color: var(--primary);
        color: var(--primary);
    }

    .event-schedule-summary-text {
        font-size: 13px;
        color: var(--text2);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .event-schedule-summary-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 0 0 auto;
    }

    .event-schedule-details {
        display: contents;
    }

    .event-schedule-group-title {
        grid-column: 1 / -1;
        font-size: 13px;
        font-weight: 700;
        color: var(--text2);
        margin: .25rem 0 0;
    }

    .event-schedule-actions {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: row;
        gap: 10px;
        justify-content: flex-start;
        width: fit-content;
        margin-right: auto;
    }

    #screen-event-card .event-editor-container.is-open .event-meeting-box {
        width: fit-content;
        max-width: 100%;
        margin-left: auto;
        margin-right: 0;
    }

    .event-meeting-title {
        font-weight: 700;
        margin-bottom: 6px;
    }

    .event-meeting-content {
        font-size: 13px;
        color: var(--text2);
    }

    .event-meeting-rows {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .event-meeting-row {
        display: flex;
        gap: 8px;
        align-items: flex-start;
    }

    .event-meeting-row-icon {
        flex: 0 0 auto;
        color: var(--text2);
        margin-top: 2px;
    }

    .event-meeting-row-text {
        display: flex;
        gap: 6px;
        align-items: baseline;
        min-width: 0;
    }

    .event-meeting-row-label {
        font-weight: 700;
        color: var(--black);
        white-space: nowrap;
    }

    .event-meeting-row-value {
        color: var(--text2);
        word-break: break-word;
    }


    /* ===== Diary Module (Event Card: תיאום ביומן) ===== */
        /*
            The Event Card tab panels are a 2-column CSS grid on desktop.
            The diary module should span both columns (full row).
        */
        #screen-event-card .form-tab-panel.active .event-schedule-area,
        #screen-event-card .form-tab-panel.active .diary-module {
                grid-column: 1 / -1;
        }

    .diary-module {
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        width: 100%;
        max-width: none;
        margin: 0;
        border: 0;
        overflow: visible;
        display: grid;
        grid-template-columns: 1.3fr 1fr;
        gap: 24px;
    }

    .diary-visuals {
        background: transparent;
        border-left: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .diary-calendar-widget {
        background: var(--bg-app);
        border-radius: 12px;
        padding: 16px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
        border: 1px solid var(--border-soft);
    }

    .diary-cal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }

    .diary-month-title {
        font-weight: 700;
        font-size: 21px;
        color: var(--text1);
    }

    .diary-cal-nav-btn {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text1);
        font-size: 11px;
        padding: 4px;
        border-radius: 6px;
    }

    .diary-cal-nav-btn:hover {
        background: rgba(0, 0, 0, 0.04);
    }

    .diary-cal-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
        text-align: center;
        align-items: center;
    }

    .diary-cal-day-name {
        font-size: 11px;
        color: var(--text1);
        font-weight: 600;
        margin-bottom: 3px;
    }

    .diary-cal-pad {
        aspect-ratio: 1;
    }

    .diary-cal-day {
        aspect-ratio: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        font-size: 12px;
        cursor: pointer;
        transition: 0.2s;
        position: relative;
        border: 1px solid transparent;
        background: transparent;
        color: var(--black);
    }

    .diary-cal-day:hover {
        background: rgba(0, 0, 0, 0.04);
    }

    .diary-cal-day.active {
        background: transparent;
        color: var(--primary);
        font-weight: 700;
        border-color: var(--primary);
        box-shadow: none;
    }

    .diary-cal-day.is-today {
        border-color: transparent;
        background: transparent;
        color: var(--black);
        font-weight: inherit;
        border-radius: 6px;
    }

    .diary-cal-day.is-today.active {
        border-color: var(--primary);
        background: transparent;
        color: var(--primary);
    }

    .diary-cal-day[data-has-event="1"]::after {
        content: '';
        position: absolute;
        bottom: 4px;
        left: 50%;
        transform: translateX(-50%);
        width: 4px;
        height: 4px;
        background: var(--lbl4);
        border-radius: 50%;
    }

    .diary-cal-day.active[data-has-event="1"]::after {
        background: var(--lbl4);
    }

    .diary-cal-day .diary-cal-day-dots {
        position: absolute;
        bottom: 5px;
        left: 50%;
        transform: translateX(-50%);
        display: inline-flex;
        align-items: center;
        gap: 3px;
        pointer-events: none;
    }

    .diary-cal-day .diary-cal-day-dot {
        width: 5.2px;
        height: 5.2px;
        border-radius: 50%;
        background: var(--lbl4);
    }

    .diary-cal-day .diary-cal-day-dot[data-schedule-type="1"] {
        background: var(--lbl2);
    }

    .diary-cal-day .diary-cal-day-dot[data-schedule-type="2"] {
        background: var(--lbl1);
    }

    .diary-cal-day .diary-cal-day-dot[data-schedule-type="3"] {
        background: var(--delete);
    }

    .diary-cal-day .diary-cal-day-dot[data-schedule-type="4"] {
        background: var(--delete);
    }

    .diary-cal-day .diary-cal-day-dot[data-schedule-type="5"] {
        background: var(--dark-gray);
    }

    #screen-event-card .diary-module.meeting-three-col .diary-cal-day[data-day-state="past"] {
        background: var(--bg-app);
        border-color: transparent;
        color: var(--placeholder);
        opacity: 1;
        cursor: not-allowed;
    }

    #screen-event-card .diary-module.meeting-three-col .diary-cal-day[data-day-state="future"] {
        background: var(--white);
        border-color: transparent;
        color: var(--black);
        cursor: pointer;
    }

    #screen-event-card .diary-module.meeting-three-col .diary-cal-day[data-day-state="today"] {
        background: var(--white);
        border-color: transparent;
        color: var(--black);
        font-weight: 700;
    }

    #screen-event-card .diary-module.meeting-three-col .diary-cal-day[data-day-state="past"].active {
        border-color: transparent;
        color: var(--text1);
        box-shadow: none;
    }

    #screen-event-card .diary-module.meeting-three-col .diary-cal-day.active {
        background: var(--white);
        border-color: transparent;
        color: var(--black);
        font-weight: 500;
        box-shadow: none;
    }

    #screen-event-card .diary-module.meeting-three-col .diary-cal-day.is-today,
    #screen-event-card .diary-module.meeting-three-col .diary-cal-day.is-today.active {
        background: var(--white);
        border-color: transparent;
        color: var(--black);
        font-weight: 700;
        box-shadow: none;
    }

    #screen-event-card .diary-module.meeting-three-col .diary-cal-day[data-day-state="past"]:hover {
        background: #EBF0F6 !important;
        border-color: transparent !important;
        box-shadow: none !important;
        transform: none !important;
    }

    #screen-event-card .diary-module.meeting-three-col .diary-cal-day[data-day-state="future"]:hover,
    #screen-event-card .diary-module.meeting-three-col .diary-cal-day[data-day-state="today"]:hover {
        background: var(--white) !important;
        border-color: transparent !important;
        box-shadow: none !important;
        transform: none !important;
    }

    #screen-event-card .diary-module.event-three-col .diary-cal-day[data-day-state="past"] {
        background: var(--white);
        border-color: var(--border-soft);
        color: var(--placeholder);
        opacity: 1;
        cursor: not-allowed;
        pointer-events: none;
    }

    #screen-event-card .diary-module.event-three-col .diary-cal-day[data-day-state="future"] {
        background: var(--white);
        border-color: transparent;
        color: var(--black);
        cursor: pointer;
    }

    #screen-event-card .diary-module.event-three-col .diary-cal-day[data-day-state="today"] {
        background: var(--white);
        border-color: transparent;
        color: var(--black);
        font-weight: 700;
    }

    #screen-event-card .diary-module.event-three-col .diary-cal-day[data-day-state="past"].active {
        border-color: transparent;
        color: var(--text1);
        box-shadow: none;
    }

    #screen-event-card .diary-module.event-three-col .diary-cal-day[data-day-state="past"]:hover {
        background: var(--white) !important;
        border-color: var(--border-soft) !important;
        box-shadow: none !important;
        transform: none !important;
    }

    /* Compact tooltip for meetings calendar day-hover */
    .diary-day-tooltip.diary-day-tooltip-meetings .events-day-tooltip-scroll {
        display: flex;
        flex-direction: column;
        padding: 10px;
        gap: 10px;
        align-items: stretch;
        max-height: min(400px, calc(100vh - 16px));
        overflow-y: auto;
        overflow-x: hidden;
    }

    .diary-day-tooltip.diary-day-tooltip-meetings {
        min-width: 280px;
        box-sizing: border-box;
        width: min(360px, calc(100vw - 24px));
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 16px);
    }

    .diary-day-tooltip.diary-day-tooltip-meetings .diary-meeting-tooltip-item {
        align-self: stretch;
        width: 100%;
        min-width: 0;
        overflow: hidden;
        box-shadow: none;
    }

    .diary-day-tooltip.diary-day-tooltip-meetings .cal-tooltip {
        padding: 10px;
        border-radius: 10px;
        box-shadow: none;
        margin: 0;
    }

    .diary-day-tooltip.diary-day-tooltip-meetings .diary-meeting-tooltip-name {
        margin: 0;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        unicode-bidi: isolate;
    }

    .diary-day-tooltip.diary-day-tooltip-meetings .tooltip-header {
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .diary-day-tooltip.diary-day-tooltip-meetings .event-type {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .diary-day-tooltip.diary-day-tooltip-meetings .diary-meeting-tooltip-status {
        flex-shrink: 0;
    }

    .diary-day-tooltip.diary-day-tooltip-meetings .info-row {
        margin-bottom: 4px;
        font-size: 12px;
    }

    .diary-day-tooltip.diary-day-tooltip-meetings .info-row:last-child {
        margin-bottom: 0;
    }

    .diary-day-tooltip.diary-day-tooltip-meetings .cal-tooltip:last-child::after,
    .diary-day-tooltip.diary-day-tooltip-meetings.is-below .cal-tooltip:last-child::after {
        display: none;
    }

    #screen-event-card .diary-day-tooltip.diary-day-tooltip-meetings .theme-closed,
    #screen-event-card .diary-day-tooltip.diary-day-tooltip-meetings .theme-option,
    #screen-event-card .diary-day-tooltip.diary-day-tooltip-meetings .theme-reserved {
        box-shadow: none;
    }

    .diary-day-tooltip:not(.diary-day-tooltip-meetings) .cal-tooltip {
        padding: 10px;
        border-radius: 10px;
        box-shadow: none;
    }

    .diary-day-tooltip:not(.diary-day-tooltip-meetings) {
        pointer-events: none;
        width: min(
            calc(100vw - 16px),
            calc(
                (var(--diary-events-count, 1) * 220px) +
                ((var(--diary-events-count, 1) - 1) * 20px) +
                20px
            )
        );
    }

    .diary-day-tooltip:not(.diary-day-tooltip-meetings) .events-day-tooltip-scroll {
        display: grid;
        grid-template-columns: repeat(var(--diary-events-count, 1), minmax(0, 1fr));
        overflow: auto;
        max-height: min(440px, calc(100vh - 100px));
        gap: 20px;
        padding: 10px;
    }

    .diary-day-tooltip:not(.diary-day-tooltip-meetings) .cal-tooltip {
        width: auto;
        min-width: 0;
        margin: 0;
    }

    .diary-day-tooltip.diary-day-tooltip-events-many {
        width: min(400px, calc(100vw - 16px));
        height: min(400px, calc(100vh - 16px));
    }

    .diary-day-tooltip.diary-day-tooltip-events-many .events-day-tooltip-scroll {
        display: grid;
        grid-template-columns: repeat(var(--diary-events-count, 1), minmax(0, 1fr));
        height: 100%;
        overflow: auto;
        gap: 20px;
    }

    .diary-day-tooltip.diary-day-tooltip-events-many .cal-tooltip {
        width: auto;
        min-width: 0;
        margin: 0;
    }

    .diary-day-tooltip:not(.diary-day-tooltip-meetings) .tooltip-header {
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    #screen-event-card .diary-day-tooltip:not(.diary-day-tooltip-meetings) .cal-tooltip.theme-cancelled {
        --accent-color: var(--gray);
        background: color-mix(in srgb, var(--gray) 25%, var(--white));
        border-color: color-mix(in srgb, var(--gray) 55%, var(--white));
    }

    #screen-event-card .diary-day-tooltip:not(.diary-day-tooltip-meetings) .cal-tooltip.theme-cancelled .status-pill {
        color: var(--text1);
    }

    .diary-agenda-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        flex: 1;
    }

    #screen-event-card .meeting-list-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 8px;
        position: relative;
        z-index: 3000;
        top: -4px;
    }

    #screen-event-card .meeting-list-title {
        color: var(--primary);
        font-size: 16px;
        font-weight: 800;
    }

    #screen-event-card .meeting-list-new-btn {
        border: 1px solid var(--border-soft);
        background: var(--lightblue);
        color: var(--primary);
        border-radius: 10px;
        padding: 7px 12px;
        font-size: 12px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
    }

    #screen-event-card .meeting-list-new-btn[data-tooltip]::before,
    #screen-event-card .meeting-list-new-btn[data-tooltip]::after {
        z-index: 3100;
        left: 47%;
    }

    #screen-event-card .meeting-list-new-btn[data-tooltip]::before,
    #screen-event-card .mtg-card[data-tooltip]::before {
        padding: .42rem .84rem;
        border-radius: 7px;
        font-size: 12px;
        font-weight: 400;
        bottom: calc(100% + 12px);
    }

    #screen-event-card .meeting-list-new-btn[data-tooltip]::after,
    #screen-event-card .mtg-card[data-tooltip]::after {
        width: 12px;
        height: 7px;
        bottom: calc(100% + 5px);
    }

    #screen-event-card .meeting-list-new-btn[data-tooltip]::after {
        margin-left: -6px;
    }

    #screen-event-card .meeting-list-new-btn[data-tooltip]::before {
        transform: translateX(-50%) translateY(8px);
    }

    #screen-event-card .meeting-list-new-btn[data-tooltip]:hover::before {
        transform: translateX(-50%) translateY(0);
    }

    #screen-event-card .meeting-list-icon-btn {
        width: 38px;
        min-width: 38px;
        height: 34px;
        padding: 0;
        justify-content: center;
        gap: 0;
    }

    #screen-event-card .meeting-list-header > .meeting-list-new-btn:nth-child(2) {
        background: var(--white);
    }

    .diary-agenda-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--text1);
        margin-bottom: 5px;
    }

    #screen-event-card .diary-agenda-main-title {
        position: relative;
        top: -25px;
    }

    #screen-event-card .meeting-agenda-add-btn {
        position: relative;
        top: 0;
        width: fit-content;
        align-self: flex-start;
        margin-top: 5px;
        margin-bottom: 6px;
    }

    #screen-event-card .diary-agenda-title-other-meetings + .mtg-card {
        margin-top: -6px;
    }

    .diary-agenda-items {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .diary-agenda-card {
        background: var(--white);
        padding: 8px 10px;
        border-radius: 10px 8px 8px 10px;
        border: 1px solid var(--border-soft);
        border-right: 4px solid transparent;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: 0.2s;
    }

    .diary-agenda-card:hover {
        transform: translateX(-3px);
    }

    .diary-agenda-card[data-schedule-type="1"] {
        border-right-color: var(--lbl1);
    }

    .diary-agenda-card[data-schedule-type="4"] {
        border-right-color: var(--lbl5);
    }

    .diary-agenda-card[data-schedule-type="2"] {
        border-right-color: var(--lbl2);
    }

    .diary-agenda-card[data-schedule-type="3"] {
        border-right-color: var(--delete);
    }

    .diary-agenda-card[data-schedule-type="5"] {
        border-right-color: var(--dark-gray);
    }

    .diary-agenda-card[data-schedule-type="meeting"] {
        border-right-color: var(--primary);
    }

    .diary-agenda-left {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .diary-time-box {
        font-weight: 800;
        font-size: 14px;
        width: 48px;
        flex: 0 0 auto;
    }

    .diary-info-box {
        min-width: 0;
    }

    .diary-info-box h4 {
        margin: 0;
        font-size: 13px;
        color: var(--black);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .diary-info-box p {
        margin: 0;
        font-size: 11px;
        color: var(--text2);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .diary-action-icon {
        color: var(--text1);
        cursor: default;
        flex: 0 0 auto;
    }

    .diary-agenda-empty {
        text-align: center;
        color: var(--text2);
        padding: 18px 14px;
        border: 1px solid var(--border-soft);
        border-radius: 12px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: 13px;
        background: var(--bg-app);
    }

    .diary-agenda-empty i {
        font-size: 16px;
    }

    .diary-visuals .event-meeting-box {
        width: 100%;
        margin: 0;
    }

    .diary-module .event-meeting-box {
        width: 100%;
        margin: 0;
    }

    .diary-form {
        padding: 24px 22px;
        background: var(--white);
        border: 1px solid var(--border-soft);
        border-radius: 14px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        min-width: 0;
        gap: 0;
    }

    .diary-form-header {
        font-size: 17px;
        font-weight: 700;
        color: var(--primary);
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-soft);
        display: flex;
        align-items: center;
        gap: 8px;
    }

    #screen-event-card .diary-form-top .calendar-nav-tabs {
        margin-bottom: 22px;
    }

    /* Scoped nav tabs inside diary form */
    #screen-event-card .diary-form-top .calendar-nav-tab {
        height: 36px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 10px;
    }

    /* Meeting quick tabs (event card scoped) */
    #screen-event-card .diary-form-top .quick-pill-tabs-host {
        margin-top: 20px;
        margin-bottom: 12px;
    }

    #screen-event-card .diary-form-top .quick-pill-tabs-title {
        display: block;
        text-align: center;
        color: var(--text2);
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    #screen-event-card .diary-form-top .quick-pill-tabs {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    #screen-event-card .diary-form-top .quick-pill-tab {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        min-height: 30px;
        padding: 0 12px;
        border-radius: 999px;
        border: 1px solid var(--border-soft);
        background: var(--white);
        color: var(--text1);
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
    }

    #screen-event-card .diary-form-top .quick-pill-tab.active {
        border-color: var(--primary);
        background: var(--primary);
        color: var(--white);
    }

    #screen-event-card .diary-form-top .quick-pill-tab:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    #screen-event-card .diary-form-top .meeting-empty-cta-wrap {
        margin-bottom: 14px;
    }

    #screen-event-card .diary-form-top .meeting-editor-calendar-host {
        margin-bottom: 12px;
    }

    #screen-event-card .diary-form-top .meeting-empty-cta-btn {
        width: 100%;
        min-height: 46px;
        border-radius: 12px;
        background: var(--primary);
        color: var(--white);
        font-weight: 700;
        font-size: 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    #screen-event-card .diary-visuals.meeting-list-col {
        background: var(--white);
        border: 1px solid var(--border-soft);
        border-radius: 16px;
        padding: 14px;
        width: 100%;
        box-sizing: border-box;
        min-height: 100%;
    }

    #screen-event-card .diary-module.meeting-three-col {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
        align-items: stretch;
    }

    #screen-event-card .meeting-calendar-col {
        background: var(--white);
        border: 1px solid var(--border-soft);
        border-radius: 16px;
        padding: 14px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        min-height: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    #screen-event-card .meeting-calendar-col .meeting-editor-calendar-host {
        margin-bottom: 0;
    }

    #screen-event-card .meeting-calendar-col .diary-calendar-widget {
        max-width: none;
        width: 100%;
    }

    #screen-event-card .diary-form.meeting-editor-col {
        background: var(--white);
        border: 1px solid var(--border-soft);
        border-radius: 16px;
        padding: 14px;
        width: 100%;
        box-sizing: border-box;
        min-height: 100%;
    }

    #screen-event-card .diary-form.meeting-editor-col .diary-form-grid {
        grid-template-columns: 1fr 1fr;
        column-gap: 10px;
        row-gap: 16px;
    }

    #screen-event-card .diary-form.meeting-editor-col .diary-form-grid .input,
    #screen-event-card .diary-form.meeting-editor-col .diary-form-grid .select,
    #screen-event-card .diary-form.meeting-editor-col .diary-form-grid textarea {
        width: 100%;
        box-sizing: border-box;
        border-radius: 6px;
    }

    #screen-event-card .diary-form.meeting-editor-col .diary-form-grid textarea {
        resize: none;
    }

    /* ===== Meeting Card (list item) ===== */
    .mtg-card {
        background: var(--lightblue);
        border: 1px solid var(--border-soft);
        border-right: 4px solid var(--primary-2);
        border-radius: 12px;
        padding: 14px 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
        cursor: pointer;
        position: relative;
        z-index: 1;
        overflow: visible;
        box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    }

    .mtg-card-info {
        min-width: 0;
    }

    .mtg-card:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
        z-index: 5;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    }

    #screen-event-card .mtg-card[data-tooltip]::before,
    #screen-event-card .mtg-card[data-tooltip]::after {
        left: 4px !important;
        z-index: 12000 !important;
    }

    #screen-event-card .mtg-card[data-tooltip]::before {
        right: auto !important;
        transform: translateX(0) translateY(8px) !important;
        font-weight: 500;
        padding-right: 30px;
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 12px 12px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    }

    #screen-event-card .mtg-card[data-tooltip]::after {
        left: 20px !important;
        right: auto !important;
        margin-left: 0 !important;
        transform: translateX(0) translateY(8px) !important;
    }

    #screen-event-card .mtg-card[data-tooltip]:hover::before,
    #screen-event-card .mtg-card[data-tooltip]:hover::after {
        transform: translateX(0) translateY(0) !important;
    }

    .mtg-card.active {
        border-color: var(--primary);
        background: var(--lightblue);
        border-right: 4px solid var(--primary);
        z-index: 5;
    }

    .mtg-card.mtg-card-neutral {
        background: var(--lightgray);
        border-color: var(--border-soft);
        border-right-color: var(--border-soft);
    }

    .mtg-card.mtg-card-other-day,
    .mtg-card.mtg-card-other-day.active {
        background: var(--lbl13);
    }

    .mtg-card.mtg-card-other-day {
        cursor: default;
    }

    .mtg-card.mtg-card-other-day:hover {
        transform: none;
    }

    .mtg-card-info h4 {
        margin: 0 0 5px 0;
        font-size: 18px;
        font-weight: 700;
        color: var(--black);
    }

    .mtg-card-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 5px;
    }

    .mtg-card-top h4 {
        margin: 0;
    }

    .mtg-card-name-wrap {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .mtg-card-type {
        font-size: 12px;
        font-weight: 600;
        color: var(--text2);
        white-space: nowrap;
    }

    .mtg-card-phone {
        font-size: 13px;
        font-weight: 400;
        color: var(--text2);
        white-space: nowrap;
    }

    .mtg-card-meta {
        font-size: 13px;
        color: var(--text2);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0;
        flex-wrap: nowrap;
    }

    .mtg-card-meta-main {
        display: flex;
        align-items: center;
        gap: 0;
        flex-wrap: wrap;
        min-width: 0;
    }

    .mtg-card-meta-sep {
        margin: 0 4px;
    }

    .mtg-card-action {
        color: var(--border-soft);
        flex: 0 0 auto;
        font-size: 14px;
        transition: color 0.2s;
    }

    .mtg-card-top .mtg-status-badge {
        margin-inline-start: 0;
        flex: 0 0 auto;
    }

    .mtg-card-action.mtg-card-action-edit {
        color: var(--primary);
    }

    .mtg-card-action.mtg-card-action-edit i {
        font-size: 0.95em;
        transform: translateX(-2px);
    }

    .mtg-card-left {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 8px;
        flex: 0 0 auto;
    }

    /* ===== Meeting Status Badges ===== */
    .mtg-status-badge {
        padding: 2px 8px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
    }

    .mtg-sb-green {
        background: var(--lbl7);
        color: var(--lbl14);
    }

    .mtg-sb-red {
        background: var(--lbl8);
        color: var(--white);
    }

    .mtg-sb-blue {
        background: var(--lightblue);
        color: var(--primary);
    }

    /* ===== Attendance Toggle ===== */
    .mtg-attendance-toggle {
        display: flex;
        background: var(--lightgray);
        padding: 4px;
        border-radius: 8px;
        gap: 4px;
    }

    .mtg-att-btn {
        flex: 1;
        border: 1px solid var(--border-soft);
        background: var(--white);
        padding: 8px;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text2);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
        font-family: inherit;
    }

    .mtg-att-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    }

    .mtg-att-btn:disabled {
        opacity: 0.45;
        cursor: not-allowed;
        pointer-events: none;
    }

    .mtg-att-btn.mtg-att-arrived {
        background: #f0fdf4;
        color: #166534;
        box-shadow: 0 3px 8px rgba(22, 101, 52, 0.12);
        border-color: #86efac;
        font-weight: 700;
    }

    .mtg-att-btn.mtg-att-noshow {
        background: #fef2f2;
        color: #991b1b;
        box-shadow: 0 3px 8px rgba(153, 27, 27, 0.12);
        border-color: #fca5a5;
        font-weight: 700;
    }

    .mtg-att-btn.mtg-att-pending {
        background: var(--white);
        color: var(--primary);
        box-shadow: 0 3px 8px rgba(30, 74, 133, 0.12);
        border-color: #bfdbfe;
        font-weight: 800;
    }

    .mtg-att-btn.mtg-att-cancelled {
        background: #f3f4f6;
        color: #374151;
        box-shadow: 0 3px 8px rgba(55, 65, 81, 0.12);
        border-color: #d1d5db;
        font-weight: 700;
    }

    /* ===== Editor section titles ===== */
    .mtg-editor-title-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 5px;
    }

    .mtg-editor-title-text {
        margin: 0;
        font-size: 14px;
        font-weight: 700;
        color: var(--text2);
        line-height: 1.4;
        flex: 1;
        position: absolute;
        top: -2.2rem;
        background-color: var(--white);
        z-index: 10;
        padding: 0 8px;
    }

    /* Legacy support for direct .mtg-editor-title usage */
    .mtg-editor-title {
        font-size: 16px;
        font-weight: 400;
        color: var(--black);
        margin-bottom: 5px;
    }

    /* ===== Meeting Delete Button ===== */
    .meeting-delete-btn {
        position: relative;
        width: 28px;
        height: 28px;
        border-radius: 6px;
        background: transparent;
        border: none;
        color: var(--delete);
        font-size: 15px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: all 0.2s ease;
    }

    .meeting-delete-btn:hover {
        background: var(--lbl9);
        transform: scale(1.08);
    }

    .meeting-delete-btn:active {
        transform: scale(0.95);
    }

    .meeting-delete-btn.hidden {
        display: none;
    }

    .meeting-delete-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    #screen-event-card .meeting-delete-btn[data-tooltip]::before {
        bottom: calc(100% + 36px);
    }

    #screen-event-card .meeting-delete-btn[data-tooltip]::after {
        bottom: calc(100% + 29px);
    }

    #meeting-delete-alert-overlay .alert-modal {
        width: min(320px, calc(100vw - 32px));
        border-radius: 20px;
        padding: 30px 24px;
    }

    #meeting-delete-alert-overlay .alert-icon.icon-danger {
        width: 64px;
        height: 64px;
        font-size: 30px;
        margin-bottom: 4px;
        background: color-mix(in srgb, var(--delete) 12%, var(--white));
        color: var(--delete);
        box-shadow: 0 0 0 8px color-mix(in srgb, var(--delete) 8%, var(--white));
    }

    #meeting-delete-alert-overlay .alert-title {
        color: var(--delete);
        font-size: 22px;
        font-weight: 800;
        line-height: 1.2;
    }

    #meeting-delete-alert-overlay .alert-desc {
        color: var(--delete);
        font-size: 16px;
        font-weight: 500;
        line-height: 1.45;
    }

    #meeting-delete-alert-overlay .alert-actions {
        margin-top: 12px;
        gap: 12px;
    }

    #meeting-delete-alert-overlay .alert-btn {
        min-height: 46px;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 800;
    }

    #meeting-delete-alert-overlay .alert-btn.primary {
        background: var(--delete);
        color: var(--white);
    }

    #meeting-delete-alert-overlay .alert-btn.primary:hover {
        background: color-mix(in srgb, var(--delete) 86%, var(--black));
    }

    #meeting-delete-alert-overlay .alert-btn.secondary {
        background: var(--white);
        border: 1px solid var(--delete);
        color: var(--delete);
    }

    #meeting-delete-alert-overlay .alert-btn.secondary:hover {
        background: color-mix(in srgb, var(--delete) 10%, var(--white));
    }

    .mtg-editor-title.is-flashing {
        animation: mtgTitleFlash 0.9s ease;
    }

    @keyframes mtgTitleFlash {
        0%, 100% {
            opacity: 1;
        }
        40% {
            opacity: 0.3;
        }
    }

    .mtg-foreign-warning {
        margin-bottom: 10px;
        padding: 8px 10px;
        border: 1px dashed var(--delete);
        border-radius: 8px;
        background: var(--lbl9);
        color: var(--delete);
        font-size: 12px;
        font-weight: 700;
        text-align: center;
    }

    /* ===== Dashed separator ===== */
    .mtg-form-separator {
        border-top: 1px dashed var(--border-soft);
        margin: 10px 0;
    }

    /* ===== Busy-day warning ===== */
    .mtg-calendar-busy-warning {
        margin-top: 10px;
        font-size: 12px;
        color: var(--delete);
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    /* ===== Meeting list scroll area ===== */
    #screen-event-card .diary-visuals.meeting-list-col .diary-agenda-items {
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* ===== Meeting list header refinements ===== */
    #screen-event-card .meeting-list-header {
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border-soft);
        margin-bottom: 16px;
    }

    /* ===== Editor column layout ===== */
    #screen-event-card .diary-form.meeting-editor-col .diary-form-top {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-top: 10px;
    }

    .diary-form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        row-gap: 22px;
        column-gap: 8px;
        margin-top: 10px;
    }

    .diary-form-grid .field {
        margin: 0;
    }

    .diary-form-grid .field.diary-full {
        grid-column: 1 / -1;
    }

    .diary-form-grid .field label {
        font-size: 11px;
        font-weight: 600;
        margin-bottom: 3px;
        display: block;
        color: var(--text2);
        letter-spacing: 0.2px;
        text-transform: none;
    }

    .diary-module .input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid var(--border-soft);
        border-radius: 10px;
        font-size: 13px;
        background-color: var(--lightgray);
        box-sizing: border-box;
        transition: 0.2s;
        outline: none;
    }

    .diary-module .input:focus {
        border-color: var(--primary);
        background-color: var(--white);
        box-shadow: none;
    }

    #screen-event-card .diary-module.event-three-col .input,
    #screen-event-card .diary-module.event-three-col input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    #screen-event-card .diary-module.event-three-col select,
    #screen-event-card .diary-module.event-three-col .tw-dp-trigger,
    #screen-event-card .diary-module.event-three-col .tw-time-input-wrapper input {
        border: 0 !important;
        box-shadow: none !important;
    }

    #screen-event-card .diary-module.event-three-col .input:focus,
    #screen-event-card .diary-module.event-three-col input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
    #screen-event-card .diary-module.event-three-col select:focus,
    #screen-event-card .diary-module.event-three-col .tw-dp-trigger:focus,
    #screen-event-card .diary-module.event-three-col .tw-time-input-wrapper input:focus {
        border: 0 !important;
        box-shadow: none !important;
    }

    .diary-module .tw-dp-root,
    .diary-module .tw-tp-wrapper,
    .diary-module .tw-dtp-root {
        width: 100%;
    }

    /* Reserved-date summary box */
    .diary-reserved-summary {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        border-radius: 10px;
        background-color: var(--lightgray);
        border: 1px solid var(--border-soft);
    }

    .diary-reserved-summary-icon {
        flex: 0 0 auto;
        color: var(--primary);
        display: flex;
        align-items: center;
    }

    .diary-reserved-summary-body {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .diary-reserved-summary-title {
        font-size: 13px;
        font-weight: 600;
        color: var(--text1);
    }

    .diary-reserved-summary-detail {
        font-size: 12px;
        color: var(--text2);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .diary-btn-group {
        display: flex;
        gap: 10px;
        margin-top: 20px;
        padding-top: 16px;
        border-top: 1px solid var(--border-soft);
    }

    .diary-btn-group .btn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 600;
        height: 42px;
    }

    .diary-btn-group .btn.btn-primary {
        box-shadow: 0 4px 12px rgba(30, 78, 132, 0.2);
    }

    .diary-btn-group .btn.btn-outline {
        background-color: transparent;
        border: 1px solid var(--border-soft);
        color: var(--text1);
    }

    #screen-event-card .event-add-venue-toggle {
        font-size: 14px;
    }

    .diary-btn-group .btn.btn-outline:hover {
        border-color: var(--primary);
        color: var(--primary);
        background-color: var(--lightblue);
    }

    #screen-event-card .event-postpone-inline {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    #screen-event-card .event-postpone-inline > .diary-btn-group {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }

    #screen-event-card .event-postpone-toggle {
        width: 100%;
    }

    #screen-event-card .event-postpone-area {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        border: 1px solid transparent;
        border-radius: 16px;
        background: var(--white);
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-in, border-color 0.2s ease;
    }

    #screen-event-card .event-postpone-area.is-open {
        max-height: 420px;
        opacity: 1;
        border-color: var(--border-soft);
    }

    #screen-event-card .event-postpone-panel {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 20px;
        background: var(--white);
    }

    #screen-event-card .event-postpone-step {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    #screen-event-card .event-postpone-step.hidden {
        display: none;
    }

    #screen-event-card .event-postpone-step-title,
    #screen-event-card .event-postpone-panel-title {
        margin: 0;
        color: var(--text1);
        font-size: 16px;
        font-weight: 700;
        text-align: center;
    }

    #screen-event-card .event-postpone-choice {
        width: 100%;
        max-height: none;
        min-height: 52px;
        padding: 0 16px;
        justify-content: space-between;
        font-size: 16px;
        font-weight: 600;
        background: var(--bg-app);
    }

    #screen-event-card .event-postpone-choice svg {
        flex-shrink: 0;
    }

    #screen-event-card .event-postpone-date-picker > .tw-dp-trigger,
    #screen-event-card .event-postpone-date-picker > .tw-dp-trigger .tw-dp-value,
    #screen-event-card .event-postpone-reason-input {
        font-size: 16px;
    }

    #screen-event-card .event-postpone-date-picker > .tw-dp-trigger {
        min-height: 50px;
        border: 1px solid var(--border-soft);
        border-radius: 10px;
        background: rgba(15, 23, 42, 0.06);
    }

    #screen-event-card .event-postpone-reason-input,
    #screen-event-card .event-postpone-reason-input:focus {
        min-height: 96px;
        padding: 12px 14px;
        resize: vertical;
        text-align: right;
        background: var(--bg-app) !important;
    }

    #screen-event-card .event-postpone-actions {
        display: flex;
        gap: 10px;
    }

    #screen-event-card .event-postpone-actions .btn {
        min-height: 48px;
        max-height: none;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 700;
    }

    #screen-event-card .event-postpone-submit {
        flex: 2;
    }

    #screen-event-card .event-postpone-actions .btn.btn-outline {
        flex: 1;
    }

    @media (max-width: 800px) {
        .diary-module {
            grid-template-columns: 1fr;
            max-width: none;
        }

        .diary-visuals {
            border-left: none;
            border-bottom: 0;
            order: 1;
            padding: 0;
            padding-inline-end: 0;
        }

        .diary-form {
            order: 2;
            padding: 0;
            padding-inline-start: 0;
            border-inline-start: 0;
        }

        .diary-cal-day {
            font-size: 11px;
        }

        #screen-event-card .event-postpone-inline {
            gap: 10px;
        }

        #screen-event-card .event-postpone-inline > .diary-btn-group,
        #screen-event-card .event-postpone-inline > .diary-btn-group .btn,
        #screen-event-card .event-postpone-area,
        #screen-event-card .event-postpone-panel,
        #screen-event-card .event-postpone-step,
        #screen-event-card .event-postpone-choice,
        #screen-event-card .event-postpone-actions .btn {
            width: 100%;
            max-width: none;
        }

        #screen-event-card .event-postpone-step {
            align-items: stretch;
        }

        #screen-event-card .event-postpone-choice {
            display: flex;
            flex: 0 0 100%;
            min-width: 0;
        }

        #screen-event-card .event-postpone-actions {
            flex-direction: column;
            align-items: stretch;
        }

        #screen-event-card .event-postpone-actions .btn {
            flex: 1 1 auto;
        }
    }

    /* Order: summary box should stick to the left like Hebrew invoices */
    .event-card-section .event-order-tab-panel .order-summary-wrap {
        max-width: 380px;
        margin-right: auto;
        margin-left: 0;
        background: var(--bg-app);
        border: 1px solid var(--border-soft);
        border-radius: 12px;
        padding: 10px 16px;
    }

    /* Order: summary rows should be single-line: label right, amount left; label color normal */
    .event-card-section .event-order-tab-panel .leads-history-row.order-summary-row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        background: transparent;
        margin: 0;
        padding: 8px 0;
        border-radius: 0;
    }

    .event-card-section .event-order-tab-panel .order-summary-row .leads-history-meta {
        color: var(--black);
        font-weight: 400;
    }

    .event-card-section .event-order-tab-panel .order-summary-row .leads-history-text {
        text-align: left;
    }

    /* Order: make the description column wider than others */
    .event-card-section .event-order-tab-panel .order-table-head.lines-grid,
    .event-card-section .event-order-tab-panel .order-table-row.lines-grid {
        grid-template-columns: 52px 3fr 0.9fr 0.95fr 0.6fr 40px;
    }

    /* Order: price display mode selector sits in the title row (compact, left-aligned) */
    .event-card-section .event-order-tab-panel .order-section-title-row .order-vat-mode-select {
        width: 190px;
        max-width: 190px;
        flex: 0 0 auto;
    }

    /* Event Card: make the "add update" (notes) form span full left column width */
    #screen-event-card .event-editor-container.is-open .lead-timeline-card .timeline-container {
        padding-right: 0;
    }

    #screen-event-card .event-editor-container.is-open .lead-timeline-card .lead-reminder-add-row {
        width: 100%;
    }

    #screen-event-card .event-editor-container.is-open .lead-timeline-card .lead-reminder-add-row .input {
        width: 100%;
    }

    .event-card-section .form-grid .field>div {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        border: none;
        box-shadow: none;
    }

    .event-card-section .form-grid .field>div>div {
        width: 100%;
    }

    #screen-event-card .label {
        background: none;
        padding: 0;
        display: block;
        max-width: unset;
        font-size: 13px;
        font-weight: 500;
        height: auto;
    }

    .event-quick-note:focus {
        background-color: white;
        border-color: #2563EB;
    }

    .event-quick-note:focus-visible {
        outline: none;
    }

    .event-editor .field.required-field input[type="checkbox"] {
        margin-right: 0;
    }

    .event-card-section .form-grid .field>div>div.dyn-file {
        align-items: self-start;
        flex-wrap: wrap;
    }

    /* Event Card: invitee (name+phone) is a composite control; it must span a full row */
    #screen-event-card .form-tab-panel.active .field:has(.phones-editor) {
        grid-column: 1 / -1;
    }

    /* Phone row styling is now handled by the .form-section scoped rules */

    .event-card-section .phone-row {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 36px;
        gap: 10px;
    }

    @media (max-width: 767px) {
        .event-card-section .phone-row {
            grid-template-columns: 1fr;
        }
    }

    .event-contact-mini {
        display: flex;
        align-items: center;
        gap: 15px;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--bg-mobile);
        margin-bottom: 20px;
    }

    .event-avatar-large {
        width: 50px;
        height: 50px;
        background: var(--lightblue);
        color: var(--primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 18px;
    }

    .event-contact-name-wrap {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .event-contact-info-name {
        font-weight: 700;
        color: var(--text1);
        cursor: pointer;
    }

    .event-contact-edit-btn {
        display: none;
        background: none;
        border: none;
        padding: 2px;
        cursor: pointer;
        color: var(--text2);
        line-height: 1;
        border-radius: 4px;
        transition: color 0.15s;
    }
    .event-contact-edit-btn:hover {
        color: var(--primary);
    }
    .event-contact-name-wrap:hover .event-contact-edit-btn {
        display: inline-flex;
    }

    .event-contact-name-wrap.always-show-edit .event-contact-edit-btn {
        display: inline-flex;
    }

    .event-contact-name-input {
        font-weight: 700;
        color: var(--black);
        font-size: inherit;
        font-family: inherit;
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 2px 8px;
        outline: none;
        width: 100%;
        max-width: 200px;
    }
    .event-contact-name-input:focus {
        border-color: var(--primary);
    }

    .event-contact-info-label {
        font-size: 13px;
        color: var(--text2);
    }

    .event-action-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Limit width on wide screens for most tabs,
       but allow Order/Payments tabs to be full width (tables). */
    .event-card-section .form-tabs-content{
        margin: 0;
        max-width: none;
    }

    .event-card-section .form-tab-panel {
        /* max-width: 800px; */
        margin: 0 auto;
    }

    /* Event Card: Diary tab (תיאום ביומן) should be full width like Order tab */
    .event-card-section .form-tabs-content > .form-tab-panel:nth-child(2) {
        max-width: none;
        margin: 0;
    }

    .event-card-section .form-tab-panel.event-order-tab-panel,
    .event-card-section .form-tab-panel.event-payments-tab-panel {
        max-width: none;
        margin: 0;
    }

    /* Event Card: basic details tab should be continuous (no large gap before dynamic fields) */
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child {
        gap: 1rem;
    }

    /* Event Card: Basic details titles should not be bold */
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .event-card-section-title {
        font-weight: 400;
    }

    /* Event Card: Basic details fields (match desktop mock look) */
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .field {
        margin: 0;
    }

    @media (min-width: 768px) {
        #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .field:has(.phones-editor) {
            margin-top: -10px;
        }
    }

    /* Event Card: hide outer label for phone fields – labels are inside each column now */
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .field:has(.phones-editor) > .label,
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .field:has(.phones-editor) > label.label {
        display: none;
    }

    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .field label:not(.multi-select-option),
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .field .label {
        font-size: 15px;
        font-weight: 600;
        color: var(--text2);
        margin: 0 0 4px;
        display: block;
    }

    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .input,
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child input,
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child select,
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child textarea {
        background-color: var(--white);
        border: 1px solid var(--border-soft);
        border-radius: 8px;
        padding: 10px 12px;
        font-size: 14px;
        color: var(--black);
        outline: none;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child textarea {
        min-height: 96px;
    }

    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .input:focus,
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child input:focus,
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child select:focus,
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child textarea:focus {
        border-color: var(--primary);
    }

    /* Date/time pickers (flatpickr) inside basic details should look like inputs */
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .flatpickr-input,
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .flatpickr-wrapper input {
        background-color: var(--white);
        border: 1px solid var(--border-soft);
        border-radius: 8px;
        padding: 10px 12px;
        font-size: 14px;
        color: var(--black);
    }

    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .flatpickr-input:focus,
    #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .flatpickr-wrapper input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
        outline: none;
    }

    /* Icon-only actions when shown inside the top widgets row */
    .event-fin-widget .event-action-list {
        flex-direction: row;
        flex-wrap: nowrap;
        width: auto;
        margin-top: 0;
        gap: 6px;
        justify-content: flex-start;
        position: absolute;
        top: 10px;
        left: 10px;
    }

    .event-fin-widget .event-action-row {
        width: 26px;
        height: 26px;
        padding: 0;
        border: none;
        background: transparent;
        border-radius: 0;
        justify-content: center;
        gap: 0;
    }

    .event-fin-widget .event-action-row span {
        display: none;
    }

    @media (min-width: 901px) {
        .event-fin-widget .event-action-row.event-action-call {
            width: auto;
            padding-inline: 0;
            border: none;
            background: transparent;
            border-radius: 0;
            gap: 0;
        }

        .event-fin-widget .event-action-row.event-action-call svg {
            display: none;
        }

        .event-fin-widget .event-action-row.event-action-call span {
            display: inline;
            font-size: 18px;
            font-weight: 700;
            color: var(--text1);
            line-height: 1;
            direction: ltr;
            unicode-bidi: plaintext;
        }

        .event-fin-widget .event-action-row.event-action-call svg {
            width: 24px;
            height: 24px;
        }
    }

    .event-fin-widget .event-action-row:hover {
        background: transparent;
        border-color: transparent;
    }

    .event-fin-widget .event-action-row.whatsapp {
        color: var(--text2);
        background: transparent;
        border-color: transparent;
    }

    .event-action-row {
        padding: 10px;
        border-radius: 1rem;
        border: 1px solid var(--border-soft);
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
        cursor: pointer;
        transition: 0.2s;
        background: var(--white);
        text-decoration: none;
        color: var(--black);
    }

    .event-action-row svg {
        flex-shrink: 0;
    }

    .event-action-row:hover {
        background: var(--bg-mobile);
        border-color: var(--primary);
    }

    .event-action-row.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
    }

    .event-fin-widget .event-action-row.event-action-call.disabled {
        pointer-events: auto;
    }

    .event-fin-widget .event-action-row.whatsapp.disabled {
        pointer-events: auto;
        opacity: 1;
        color: var(--text2);
        cursor: pointer;
    }

    .event-fin-widget .event-action-row.whatsapp[data-tooltip] {
        z-index: auto;
    }

    .event-fin-widget .event-action-row.whatsapp[data-tooltip]::before,
    .event-fin-widget .event-action-row.whatsapp[data-tooltip]::after {
        z-index: 12000;
    }

    .event-action-row.whatsapp {
        color: #166534;
        border-color: #DCFCE7;
        background: #F0FDF4;
    }

    /* Timeline */
    .event-timeline {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding-bottom: 80px;
    }

    .event-tl-item {
        display: flex;
        gap: 12px;
        position: relative;
    }

    .event-tl-item:not(:last-child)::before {
        content: '';
        position: absolute;
        top: 24px;
        right: 9px;
        width: 2px;
        height: 100%;
        background: var(--border-soft);
    }

    .event-tl-dot {
        width: 20px;
        height: 20px;
        background: #DBEAFE;
        border: 2px solid var(--white);
        outline: 2px solid var(--primary-dark);
        border-radius: 50%;
        flex-shrink: 0;
        margin-top: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-dark);
    }

    .event-tl-dot svg {
        display: block;
    }

    .event-tl-content {
        background: var(--white);
        padding: 10px;
        border-radius: 18px 8px 18px 6px;
        flex: 1;
        font-size: 14px;
    }

    .event-tl-item.is-system .event-tl-dot {
        background: var(--bg-mobile);
        outline-color: var(--border-soft);
        color: var(--text2);
    }

    .event-tl-item.is-system .event-tl-content {
        background: var(--bg-mobile);
        border: 1px solid var(--border-soft);
        color: var(--text2);
    }

    .event-tl-item.is-system:not(:first-child) {
        margin-top: -10px;
    }

    .event-tl-item.is-user .event-tl-content {
        border: 1px solid var(--border-soft);
        color: var(--black);
    }

    .event-tl-time {
        font-size: 12px;
        color: var(--text2);
        margin-bottom: 4px;
        display: block;
    }

    /* Desktop Header Button Styles */
    .event-desktop-header .btn-primary {
        color: var(--white);
        border: none;
    }

    .event-desktop-header .btn-primary:hover {
        background: var(--primary-dark);
    }

    .event-desktop-header .btn-outline {
        background: var(--white);
        border: 1px solid var(--border-soft);
        color: var(--black);
    }

    .event-desktop-header .btn-outline:hover {
        background: var(--bg-mobile);
    }

    .event-status-badge {
        --status-color: var(--primary);
        color: var(--status-color);
        background: color-mix(in srgb, var(--status-color) 10%, var(--white));
        padding: 4px 14px;
        border-radius: 999px;
        font-size: 16px;
        font-weight: 600;
    }

    .event-status-badge.status-1 { --status-color: var(--lbl1); }
    .event-status-badge.status-2 { --status-color: var(--lbl2); }
    .event-status-badge.status-3 { --status-color: var(--lbl5); }
    .event-status-badge.status-4 { --status-color: var(--lbl3); }
    .event-status-badge.status-8 { --status-color: var(--lbl3); }
    .event-status-badge.status-5 { --status-color: var(--lbl4); }
    .event-status-badge.status-6 { --status-color: var(--delete); }
    .event-status-badge.status-7 { --status-color: var(--dark-gray); }
    .event-status-badge.status-9 { --status-color: var(--primary); }
    .event-status-badge.status-10 { --status-color: var(--dark-gray); }
    .event-status-badge.schedule-reserved { --status-color: var(--lbl5); }

    .event-timeline-card {
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .event-timeline-card .event-card-section-title {
        margin-bottom: 10px;
    }

    /* ── FAB wrapper: sticky anchor at bottom ── */
    .event-quick-note-fab-wrap {
        position: sticky;
        bottom: 0;
        z-index: 200;
        pointer-events: none;
        height: 0;
        overflow: visible;
    }

    /* ── Floating FAB button ── */
    .event-quick-note-fab {
        position: absolute;
        bottom: -140px;
        left: 30px;
        z-index: 9999;
        pointer-events: auto;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        border: none;
        background: linear-gradient(135deg, var(--primary) 0%, #0f294d 100%);
        color: var(--white);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 28px rgba(30, 78, 132, 0.35);
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    }
    .event-quick-note-fab:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 12px 36px rgba(30, 78, 132, 0.45);
    }
    .event-quick-note-fab.active {
        transform: rotate(45deg);
    }
    .event-quick-note-fab svg {
        stroke: var(--white);
    }

    /* ── Panel widget ── */
    .event-quick-note-panel {
        position: absolute;
        bottom: -75px;
        left: 30px;
        pointer-events: auto;
        width: 380px;
        max-width: calc(100vw - 60px);
        background: var(--white);
        border-radius: 20px;
        box-shadow: 0 10px 40px -5px rgba(30, 78, 132, 0.25);
        border: 1px solid var(--white);
        z-index: 9999;
        overflow: hidden;
        animation: qnSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
    }
    @keyframes qnSlideUp {
        from { transform: translateY(30px); opacity: 0; }
        to   { transform: translateY(0); opacity: 1; }
    }

    /* Header */
    .event-qn-header {
        background: linear-gradient(135deg, var(--primary) 0%, #0f294d 100%);
        padding: 14px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: var(--white);
    }
    .event-qn-title {
        font-size: 15px;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--white);
    }
    .event-qn-title svg { stroke: var(--white); }
    .event-qn-minimize {
        background: rgba(255,255,255,0.2);
        border: none;
        color: var(--white);
        width: 26px;
        height: 26px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
    }
    .event-qn-minimize:hover { background: rgba(255,255,255,0.4); }
    .event-qn-minimize svg { stroke: var(--white); }

    /* Body */
    .event-qn-body { padding: 20px; }
    .event-qn-input-container {
        background: #f8fafc;
        border: 1px solid var(--border-soft);
        border-radius: 12px;
        padding: 12px;
        transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    }
    .event-qn-input-container:focus-within {
        background: var(--white);
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(30, 78, 132, 0.1);
    }
    .event-qn-textarea {
        width: 100%;
        border: none;
        background: transparent;
        font-family: inherit;
        font-size: 14px;
        color: var(--black);
        resize: none;
        outline: none;
        min-height: 80px;
        box-sizing: border-box;
    }
    .event-qn-textarea::placeholder { color: #94a3b8; }

    /* Footer */
    .event-qn-footer {
        padding: 0 20px 20px 20px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    .event-qn-send-btn {
        background: linear-gradient(135deg, var(--primary) 0%, #0f294d 100%);
        color: var(--white);
        border: none;
        padding: 10px 25px;
        border-radius: 50px;
        font-weight: 700;
        font-size: 14px;
        font-family: inherit;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 4px 15px rgba(30, 78, 132, 0.3);
        transition: transform 0.2s, box-shadow 0.2s;
    }
    .event-qn-send-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(30, 78, 132, 0.4);
    }
    .event-qn-send-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }
    .event-qn-send-btn svg { stroke: var(--white); }



    .event-editor .editor-topbar,
    .event-editor .comments-box.lead-timeline-card,
    .event-editor .comments-box.lead-extras-card,
    .event-editor .section-wrapper {
        display: none;
    }

    .placeholder-content {
        padding: 0;
        text-align: center;
        color: var(--text2);
        grid-column: 1 / -1;
        cursor: pointer;
    }

    .btn-tasks {
        grid-column: 1 / -1;
        display: flex;
        justify-content: flex-end;
        width: fit-content;
        margin-right: auto;
    }

    .placeholder-icon {
        font-size: 48px;
        margin-bottom: 20px;
    }

    .placeholder-title {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 10px;
    }

    .placeholder-desc {
        font-size: 14px;
    }

    .order-section-title {
        font-weight: 600;
        color: var(--black);
        margin-bottom: .5rem;
    }

    .order-section-card {
        border: 1px solid var(--border-soft);
        border-radius: 14px;
        background: var(--white);
        padding: 14px 16px;
    }

    .order-top-row,
    .order-section-box,
    .order-bottom-row,
    .event-editor-container.is-open .comments-box {
        grid-column: 1 / -1;
    }

    .event-editor-container.is-open .comments-box {
        margin: 0;
    }

    .order-top-row {
        display: none;
    }

    .order-bottom-col {
        flex: 1 1 320px;
    }

    .form-section-header {
        font-size: 16px;
        font-weight: 700;
        color: var(--black);
        margin-bottom: 15px;
        margin-top: 10px;
    }
}

/* ===== Event Card: main-column wow polish (scoped) ===== */
#screen-event-card .event-editor-main-column {
    min-width: 0;
}

#screen-event-card .event-editor-main-column .event-card-section {
    border: 0;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

#screen-event-card .event-editor-side-column .event-card-section {
    border: 0;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

/* Ensure our tab panels behave like the mock (panel wrapper controls layout) */
@media (min-width: 768px) {
    #screen-event-card .event-editor-container.is-open .event-card-section .form-tab-panel {
        display: none;
    }

    #screen-event-card .event-editor-container.is-open .event-card-section .form-tab-panel.active {
        display: block;
    }
}

/* Desktop: sticky tabs inside the main card */
@media (min-width: 768px) {
    #screen-event-card .event-card-section .event-desktop-tabs-container {
        position: sticky;
        top: 0;
        z-index: 3;
        scrollbar-width: thin;
        scrollbar-color: var(--border) transparent;
    }

    #screen-event-card .event-card-section .event-desktop-tabs-container::-webkit-scrollbar {
        height: 2px;
    }

    #screen-event-card .event-menu-category-title,
    .documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-category-title {
        font-size: 18px;
    }

    #screen-event-card .event-card-section .event-desktop-tabs-container::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 999px;
    }

    #screen-event-card .event-card-section .event-desktop-tabs-container::-webkit-scrollbar-track {
        background: transparent;
    }
}

/* Make scroll areas feel smooth and readable */
#screen-event-card .content-scroll {
    scroll-behavior: smooth;
}

/* Form sections become responsive 2-col grids by default */
#screen-event-card .form-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

#screen-event-card .form-section > .section-title {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    #screen-event-card .form-section {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px;
    }
}

/* Field spacing + spanning helpers */
#screen-event-card .form-section .field {
    margin: 0;
}

#screen-event-card .form-section .field.col-2 {
    grid-column: 1 / -1;
}

#screen-event-card .form-section .field:has([data-field-name="GuestsCount"]),
#screen-event-card .form-section .field:has([data-field-name="כמות מוזמנים"]),
#screen-event-card .form-section .field:has(input[placeholder*="300 מוזמנים"]) {
    display: none !important;
}

#screen-event-card .event-basic-two-cols .form-section .field.diary-full {
    grid-column: 1 / -1;
}

/* 1/3-width helper (span the row, but keep control width like a single phone-row column) */
#screen-event-card .form-section .field.col-1-3 {
    grid-column: 1 / -1;
    justify-self: start;
    width: 100%;
    max-width: calc((100% - 40px) / 3);
}

/* 3-column fields row */
#screen-event-card .fields-row-3 {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    #screen-event-card .form-section .field.col-1-3 {
        max-width: 100%;
    }
    #screen-event-card .fields-row-3 {
        grid-template-columns: 1fr;
    }
}

/* Estimated date: input + calendar trigger side by side */
#screen-event-card .estimated-date-wrap {
    display: flex;
    align-items: stretch;
    gap: 8px;
    position: relative;
}

#screen-event-card .estimated-date-wrap .estimated-date-input {
    flex: 1;
    min-width: 0;
}

/* Make the datepicker trigger an icon-only square button */
#screen-event-card .estimated-date-picker {
    flex-shrink: 0;
    align-self: stretch;
}

#screen-event-card .estimated-date-picker > .tw-dp-trigger {
    width: 36px;
    min-height: 36px;
    height: 100%;
    padding: 0;
    justify-content: center;
    gap: 0;
}

#screen-event-card .estimated-date-picker > .tw-dp-trigger .tw-dp-value {
    display: none;
}

/* Nice, consistent section titles */
#screen-event-card .section-title {
    letter-spacing: 0.1px;
}

/* Align dynamic file/checkbox rows with the new layout */
#screen-event-card .form-section .field > div {
    width: 100%;
}

/* Inputs: softer background, better placeholder contrast */
#screen-event-card .form-section input::placeholder,
#screen-event-card .form-section textarea::placeholder {
    color: var(--placeholder);
}

/* Buttons inside tab content: keep consistent sizing */
#screen-event-card .form-section .btn {
}

#screen-event-card .digital-invite-templates {
    display: flex;
    align-items: center;
    gap: 14px;
    direction: rtl;
    justify-content: flex-end;
    width: 100%;
    text-align: right;
    padding-top: 4px;
    margin-bottom: 4px;
}

#screen-event-card .checkbox-wrapper.digital-invite-templates {
    justify-content: flex-end !important;
    direction: rtl !important;
    margin-inline-start: auto;
}

#screen-event-card .digital-invite-templates .checkbox-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-direction: row-reverse;
    direction: rtl;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e1e8ed;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    min-width: 140px;
    justify-content: center;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
}

#screen-event-card .digital-invite-templates .checkbox-label:hover {
    border-color: #1E4E84;
    background: linear-gradient(135deg, #e8f2ff 0%, #f0f7ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 78, 132, 0.15);
}

#screen-event-card .digital-invite-templates .checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

#screen-event-card .digital-invite-templates .checkbox-label .checkmark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2.5px solid #d0d7de;
    border-radius: 50%;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    flex-shrink: 0;
    position: relative;
}

#screen-event-card .digital-invite-templates .checkbox-label .checkmark::after {
    content: '';
    display: block;
    width: 7px;
    height: 12px;
    border: solid #ffffff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.25s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -3px;
    margin-top: -7px;
}

#screen-event-card .digital-invite-templates .checkbox-label input[type="checkbox"]:checked ~ .checkmark {
    background: linear-gradient(135deg, #1E4E84 0%, #2563a8 100%);
    border-color: #1E4E84;
    box-shadow: 0 0 0 4px rgba(30, 78, 132, 0.12);
}

#screen-event-card .digital-invite-templates .checkbox-label input[type="checkbox"]:checked ~ .checkmark::after {
    transform: rotate(45deg) scale(1);
}

#screen-event-card .digital-invite-templates .checkbox-label input[type="checkbox"]:checked {
    & ~ .checkbox-label {
        background: linear-gradient(135deg, #1E4E84 0%, #2563a8 100%);
        border-color: #1E4E84;
    }
}

/* When checkbox is checked, style the entire label */
#screen-event-card .digital-invite-templates .checkbox-label:has(input[type="checkbox"]:checked) {
    background: linear-gradient(135deg, #1E4E84 0%, #2563a8 100%);
    border-color: #1E4E84;
    box-shadow: 0 4px 16px rgba(30, 78, 132, 0.25);
    transform: scale(1.02);
}

#screen-event-card .digital-invite-templates .checkbox-label:has(input[type="checkbox"]:checked):hover {
    background: linear-gradient(135deg, #1a4573 0%, #225999 100%);
    transform: scale(1.02) translateY(-2px);
}

#screen-event-card .digital-invite-templates .checkbox-label input[type="checkbox"]:checked ~ .checkbox-text {
    color: #ffffff;
    font-weight: 600;
}

#screen-event-card .digital-invite-templates .checkbox-label .checkbox-text {
    font-size: 15px;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Payments wrapper (replaces inline styles) */
#screen-event-card .order-payments-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Order/Payments: clearer section titles + spacing */
#screen-event-card .event-order-tab-panel .form-container {
    max-width: 1100px;
}

#screen-event-card .event-payments-tab-panel .form-container {
    max-width: none;
}

@media (min-width: 901px) {
    #screen-event-card .event-order-tab-panel .form-container[data-ec-container="1"] {
        width: 100%;
        max-width: 1200px;
        margin-inline: auto;
    }
}

/* Order/Payments: lighten "form-section" grid for table-like content */
#screen-event-card .event-order-tab-panel .form-section,
#screen-event-card .event-payments-tab-panel .form-section {
    display: block;
}

/* Table-like order UI: add breathing room between blocks */
#screen-event-card .event-order-tab-panel .order-section-box,
#screen-event-card .event-payments-tab-panel .order-section-box {
    margin-bottom: 18px;
}

#screen-event-card .event-payments-tab-panel .order-section-box {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Diary: let it take the full available width in its container */
#screen-event-card .event-schedule-area {
    width: 100%;
}

@media (min-width: 768px) {
    #screen-event-card .event-card-section .form-tab-panel.active:has(.event-schedule-area) .event-schedule-area,
    #screen-event-card .event-card-section .form-tab-panel.active:has(.event-schedule-area) .diary-module {
        min-height: 0;
    }
}

/* ===== Event Card: shared tabs styling (mobile) ===== */
#screen-event-card .form-tabs-wrapper {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    overflow: hidden;
}

/* Desktop wraps tabs inside .event-card-section (already a card) */
#screen-event-card .event-card-section .form-tabs-wrapper {
    border: 0;
    border-radius: 0;
}

#screen-event-card .event-editor .form-tabs-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border-soft);
    padding: 0 12px;
    overflow: auto;
    gap: 0;
}

/* Event Card: basic tab two-column layout */
@media (min-width: 768px) {
    .event-basic-two-cols {
        display: grid;
        grid-template-columns: minmax(0, 50%) minmax(0, 50%);
        gap: 24px;
        width: 100%;
        max-width: 100%;
        margin-inline-start: 0;
        align-items: start;
        padding-bottom: 17rem;
    }

    #screen-event-card .form-container.event-basic-two-cols-host {
        max-width: 100%;
    }

    #screen-event-card .event-basic-two-cols > .form-section {
        width: 100%;
        align-self: start;
        align-items: baseline;
        background: var(--bg-app);
    }

    #screen-event-card .event-basic-two-cols > .form-section:only-child {
        grid-column: 1 / -1;
    }
}

#screen-event-card .event-editor .form-tab-btn {
    background: transparent;
    border: 0;
    padding: 16px 14px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

#screen-event-card .event-editor .form-tab-btn:hover {
    color: var(--primary);
}

#screen-event-card .event-editor .form-tab-btn.tab-disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

#screen-event-card .event-editor .form-tab-btn.active {
    color: var(--white);
    background: var(--primary);
    font-weight: 700;
    border-radius: 10px 10px 0 0;
}

#screen-event-card .event-editor .form-tab-btn.active::after {
    content: none;
}

/* ===== Event Card: mock layout helpers (scoped) ===== */
#screen-event-card .content-centered {
    display: flex;
    justify-content: center;
    width: 100%;
}

#screen-event-card .content-scroll {
    width: 100%;
    overflow: auto;
    padding: 24px 28px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    #screen-event-card .content-scroll {
        width: 90%;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    #screen-event-card .content-scroll {
        padding: 18px 16px;
    }
}

#screen-event-card .form-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

#screen-event-card .event-card-forms-layout {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: stretch;
    direction: rtl;
}

#screen-event-card .event-card-forms-layout > .event-card-forms-section {
    flex: 1 1 320px;
    min-width: 0;
    margin-bottom: 0;
}

#screen-event-card .event-card-forms-layout > .event-card-forms-section:first-child {
    flex: 3 1 0;
}

#screen-event-card .event-card-forms-layout > .event-card-forms-section:last-child {
    flex: 1 1 0;
}

#screen-event-card .event-card-forms-layout .order-section-card {
    min-height: 220px;
    padding: 22px 24px;
    border: 1px solid var(--border-soft);
}

#screen-event-card .event-card-forms-layout .order-section-title-row {
    margin-bottom: 14px;
}

#screen-event-card .event-card-forms-contracts-host {
    width: 100%;
}

#screen-event-card .event-card-forms-layout > .event-card-forms-section:first-child .order-section-card {
    padding: 0;
}

#screen-event-card .event-card-forms-create-section .order-section-card {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--lightblue2);
}

#screen-event-card .event-card-forms-create-section .order-section-title {
    display: none;
}

#screen-event-card .event-card-forms-create-placeholder {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-size: 20.4px;
    font-weight: 400;
    color: var(--text2);
    cursor: pointer;
}

#screen-event-card .event-card-forms-create-placeholder-icon {
    font-size: 33.05px;
    line-height: 1;
    font-weight: 300;
}

#screen-event-card .event-card-forms-create-placeholder-label {
    font-size: 20.4px;
    line-height: 1.2;
}

#screen-event-card .event-card-forms-type-label {
    font-weight: 700;
    color: var(--text);
}

#screen-event-card .event-card-forms-type-meta {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text2);
}

#screen-event-card .event-card-forms-table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

#screen-event-card .event-card-forms-table-wrap::-webkit-scrollbar {
    height: 5px;
}

#screen-event-card .event-card-forms-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    color: var(--text);
    direction: rtl;
}

#screen-event-card .event-card-forms-table th,
#screen-event-card .event-card-forms-table td {
    padding: 12px 10px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-soft);
    font-size: 14px;
}

#screen-event-card .event-card-forms-table th {
    color: var(--text2);
    font-weight: 700;
    background: var(--lightblue2);
    white-space: nowrap;
}

#screen-event-card .event-card-forms-table th:nth-child(4),
#screen-event-card .event-card-forms-table td:nth-child(4) {
    width: 108px;
}

#screen-event-card .event-card-forms-table th:nth-child(5),
#screen-event-card .event-card-forms-table td:nth-child(5),
#screen-event-card .event-card-forms-table th:nth-child(6),
#screen-event-card .event-card-forms-table td:nth-child(6) {
    width: 81px;
}

#screen-event-card .event-card-forms-table tbody tr:last-child td {
    border-bottom: none;
}

#screen-event-card .event-card-forms-table a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

#screen-event-card .event-card-forms-view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#screen-event-card .event-card-forms-view-link svg {
    width: 18px;
    height: 18px;
}

#screen-event-card .event-card-forms-datetime-cell {
    font-size: 13px;
}

#screen-event-card .event-card-forms-datetime-date {
    font-size: 12px;
}

#screen-event-card .event-card-forms-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--border-soft);
    background: var(--white);
}

#screen-event-card .event-card-forms-status.is-signed {
    color: var(--lbl14);
    border-color: var(--lbl1);
    background: var(--lbl11);
}

#screen-event-card .event-card-forms-status.is-pending {
    color: var(--text2);
}

#screen-event-card .event-card-forms-status[data-tooltip] {
    cursor: default;
}

#screen-event-card .event-card-forms-download-link {
    white-space: nowrap;
    width: calc(36px * 0.9);
    height: calc(36px * 0.9);
    padding: 0;
    min-height: calc(36px * 0.9);
    max-height: calc(36px * 0.9);
    border: none;
}

#screen-event-card .event-card-forms-download-link svg {
    width: 18px;
    height: 18px;
}

#screen-event-card .event-card-forms-datetime-time {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text2);
}

.event-card-form-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.event-card-form-picker-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

.event-card-form-picker-overlay.hidden {
    display: none;
}

.event-card-form-picker-modal {
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    transform: translateY(18px) scale(0.98);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.event-card-form-picker-modal.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.event-card-form-picker-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-soft);
}

.event-card-form-picker-modal-close {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--white);
    color: var(--text2);
}

.event-card-form-picker-modal-close svg {
    width: 18px;
    height: 18px;
}

.event-card-form-picker-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.event-card-form-picker-modal-header-spacer {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
}

.event-card-form-picker-modal-body {
    padding: 20px 22px 24px;
    overflow: auto;
}

.event-card-form-picker-stack,
.event-card-form-picker-results {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.event-card-form-picker-item,
.event-card-form-picker-confirm-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: var(--bg-app);
}

.event-card-form-picker-item-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.event-card-form-picker-item-name,
.event-card-form-picker-confirm-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.event-card-form-picker-item-meta,
.event-card-form-picker-confirm-meta {
    font-size: 13px;
    color: var(--text2);
}

.event-card-form-picker-item-actions,
.event-card-form-picker-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.event-card-form-picker-actions .btn {
    font-size: 14px;
}

.event-card-form-picker-actions [data-event-card-form-picker-action="confirm-add"] {
    font-size: 15px;
}

.event-card-form-picker-item-actions [data-event-card-form-picker-action="select-template"] {
    font-size: 15px;
    background: #19548d;
    border-color: #19548d;
}

.event-card-form-picker-actions [data-event-card-form-picker-action="back-to-list"] {
    display: none;
}

.event-card-live-form-overlay {
    position: fixed;
    inset: 0;
    z-index: 10030;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.event-card-live-form-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

.event-card-live-form-overlay.hidden {
    display: none;
}

.event-card-live-form-modal {
    width: min(calc(210mm + 72px), calc(100vw - 32px));
    max-height: min(920px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    transform: translateY(18px) scale(0.98);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.event-card-live-form-modal.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.event-card-live-form-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 28px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--white);
}

.event-card-live-form-modal-header-spacer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.event-card-live-form-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    flex: 0 1 auto;
}

.event-card-live-form-modal-body {
    padding: 14px 28px 24px;
    background: var(--white);
    overflow: auto;
}

.event-card-live-form-modal-stack,
.event-card-live-form-preview-shell,
.event-card-live-form-preview-paper,
.event-card-live-form-preview-form,
.event-card-live-form-preview-header,
.event-card-live-form-preview-hero,
.event-card-live-form-signature-section,
.event-card-live-form-signature-section-header,
.event-card-live-form-checkbox-group,
.event-card-live-form-preview-heading-block {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.event-card-live-form-toolbar {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-inline-start: auto;
}

.event-card-live-form-toolbar.crm-config-forms-editor-actions {
    gap: 10px;
}

.event-card-live-form-toolbar .btn-save {
    background: var(--primary);
    color: var(--white);
    border: 1px solid var(--primary);
    padding: 5px 18px;
    border-radius: 10px;
    font-size: clamp(14px, 2.5vw, 17px);
    font-weight: 400;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(30, 78, 132, 0.2);
}

.event-card-live-form-toolbar .btn.btn-secondary {
    background: var(--primary) !important;
    color: var(--white) !important;
    border: 1px solid var(--primary) !important;
    font-size: clamp(14px, 2.5vw, 17px);
}

.event-card-live-form-toolbar .btn-save:disabled,
.event-card-live-form-toolbar .btn.btn-secondary:disabled {
    opacity: 0.6;
    cursor: default;
}

.event-card-live-form-toolbar .crm-config-forms-preview-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.event-card-live-form-toolbar .crm-config-forms-preview-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.event-card-live-form-a4-host {
    display: flex;
    justify-content: center;
    width: 100%;
    min-width: 0;
    padding: 0;
}

.event-card-live-form-preview-shell {
    width: min(210mm, 100%);
    max-width: 100%;
    margin: 0 auto;
}

.event-card-live-form-preview-paper {
    width: 100%;
    max-width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 12mm 12mm 14mm;
    border-radius: 6px;
    border: 1px solid #d8dee6;
    background: var(--white);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    font-size: var(--event-card-live-form-font-size, 16px);
    box-sizing: border-box;
}

.event-card-live-form-preview-kicker {
    color: var(--brand-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.event-card-live-form-preview-header {
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.event-card-live-form-preview-header h3 {
    margin: 0;
    color: var(--brand-blue);
    font-size: 34px;
    line-height: 1.15;
}

.event-card-live-form-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border: 1px solid #d8dee6;
}

.event-card-live-form-details-table {
    width: 92%;
    margin-right: 0;
    margin-left: auto;
}

.event-card-live-form-details-table .event-card-live-form-table-row th,
.event-card-live-form-details-table .event-card-live-form-table-row td,
.event-card-live-form-details-table .event-card-live-form-table-section-row th {
    padding: 8px 12px;
}

.event-card-live-form-details-table .event-card-live-form-preview-heading-block h4 {
    font-size: 15px;
}

.event-card-live-form-details-table .event-card-live-form-table-field-label {
    font-size: 12px;
}

.event-card-live-form-details-table .event-card-live-form-table-value,
.event-card-live-form-details-table .event-card-live-form-value-text {
    font-size: 14px;
}

.event-card-live-form-preview-form > .event-card-live-form-table,
.event-card-live-form-preview-form > .event-card-live-form-signature-section {
    width: 92%;
    margin-right: 0;
    margin-left: auto;
}

.event-card-live-form-table thead th {
    padding: 10px 12px;
    border: 1px solid #d8dee6;
    background: #f8fafc;
    color: var(--brand-blue);
    font-size: 14px;
    font-weight: 800;
    text-align: right;
}

.event-card-live-form-table-row th,
.event-card-live-form-table-row td,
.event-card-live-form-table-section-row th {
    padding: 10px 12px;
    border: 1px solid #d8dee6;
    vertical-align: top;
    text-align: right;
}

.event-card-live-form-table-field-label {
    width: 34%;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
}

.event-card-live-form-table-field-label span,
.event-card-live-form-table-field-label small {
    display: block;
}

.event-card-live-form-table-field-label small,
.event-card-live-form-preview-heading-block p,
.event-card-live-form-preview-empty,
.event-card-live-form-empty-options,
.event-card-live-form-signature-section-header p {
    margin: 0;
    color: var(--text-muted);
}

.event-card-live-form-table-value {
    width: 66%;
    color: #0f172a;
}

.event-card-live-form-value-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.event-card-live-form-value-empty {
    color: var(--text-muted);
}

.event-card-live-form-table-section-row th {
    background: #f8fafc;
}

.event-card-live-form-preview-heading-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.event-card-live-form-preview-heading-block h4,
.event-card-live-form-signature-section-header h4 {
    margin: 0;
    color: var(--brand-blue);
}

.event-card-live-form-preview-heading-block h4 {
    font-size: 17px;
}

.event-card-live-form-signature-section-header h4 {
    font-size: 17px;
}

.event-card-live-form-control {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d8dee6;
    border-radius: 2px;
    background: #fff;
    color: #0f172a;
    padding: 12px 14px;
    font: inherit;
}

input.event-card-live-form-control,
select.event-card-live-form-control {
    height: 36px;
    min-height: 36px;
    padding: 6px 12px;
}

.event-card-live-form-textarea {
    min-height: 120px;
    resize: vertical;
}

.event-card-live-form-choice-pair {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.event-card-live-form-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
}

.event-card-live-form-check.option {
    padding: 0 12px;
}

.event-card-live-form-signature-section {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 20px;
    font-size: 13px;
}

.event-card-live-form-signature-section-header h4 {
    font-size: 14px;
}

.event-card-live-form-signature-contract-rows {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.event-card-live-form-signature-contract-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.event-card-live-form-signature-contract-field {
    display: inline-flex;
    align-items: flex-end;
    gap: 10px;
    min-width: 0;
    color: #0f172a;
    font-weight: 500;
    font-size: inherit;
}

.event-card-live-form-signature-contract-field.is-date {
    flex: 0 1 34%;
}

.event-card-live-form-signature-contract-field.is-signature {
    flex: 1 1 50%;
}

.event-card-live-form-signature-contract-field span {
    white-space: nowrap;
}

.event-card-live-form-signature-line {
    flex: 1 1 auto;
    min-width: 120px;
    height: 0;
    border-top: 2px solid #111827;
}

@media (max-width: 767px) {
    .event-card-live-form-overlay {
        padding: 0;
    }

    .event-card-live-form-modal {
        width: 100vw;
        max-width: 100vw;
        height: 90vh;
        max-height: 90vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .event-card-live-form-modal-header {
        padding: 10px 12px;
        border-bottom: 0;
    }

    .event-card-live-form-modal-title {
        font-size: 15px;
    }

    .event-card-form-picker-modal-title {
        font-size: 15px;
    }

    .event-card-form-picker-modal-close {
        width: auto;
        height: auto;
        border: 0 !important;
        background: transparent !important;
        color: var(--text) !important;
        padding: 4px 8px !important;
        border-radius: 0 !important;
        order: 99;
        margin-inline-start: auto;
    }

    .event-card-form-picker-modal-title {
        order: 1;
        margin-inline-end: auto;
    }

    .event-card-form-picker-modal-header-spacer {
        display: none !important;
    }

    .event-card-form-picker-overlay {
        padding: 0;
    }

    .event-card-form-picker-modal {
        width: 100vw;
        max-width: 100vw;
        height: 90vh;
        max-height: 90vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .event-card-form-picker-item,
    .event-card-form-picker-confirm-card {
        border: 0;
        border-radius: 0;
    }

    .event-card-form-picker-modal-close svg {
        width: 21px;
        height: 21px;
        stroke-width: 2.4;
    }

    .event-card-live-form-table-value,
    .event-card-live-form-table-value *,
    .event-card-live-form-value-text,
    .event-card-live-form-control,
    .event-card-live-form-textarea,
    .event-card-live-form-check,
    .event-card-live-form-check span,
    .event-card-live-form-checkbox-group,
    .event-card-live-form-checkbox-group * {
        font-size: 14px !important;
    }

    .event-card-live-form-modal-body {
        padding: 0 12px 0 0;
    }

    .event-card-live-form-toolbar .crm-config-forms-preview-action-btn {
        display: none !important;
    }

    .event-card-live-form-toolbar .btn.btn-secondary[data-event-card-live-form-action="close-editor"] {
        background: transparent !important;
        color: var(--text) !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 4px 8px !important;
        min-height: 0 !important;
        font-size: 1.2em !important;
        font-weight: 700;
    }

    .event-card-live-form-toolbar .btn.btn-secondary[data-event-card-live-form-action="close-editor"] svg {
        width: 21px !important;
        height: 21px !important;
        stroke-width: 2.4 !important;
    }

    .event-card-live-form-preview-shell,
    .event-card-live-form-preview-paper {
        width: 100%;
        max-width: 100%;
        min-height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }
}

/* Basic details tab: allow wider layout than the default 950px cap */
#screen-event-card .form-container.event-basic-two-cols-host {
    width: 100%;
}

/* When inside the desktop tab grid, span the full width */
#screen-event-card .event-card-section .form-tab-panel.active > .content-centered,
#screen-event-card .event-card-section .form-tab-panel.active > .content-scroll {
    grid-column: 1 / -1;
}

#screen-event-card .form-section {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

#screen-event-card .section-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 0;
    border-bottom: 1px dashed var(--border-soft);
}

#screen-event-card .section-title i {
    color: var(--primary);
}

#screen-event-card .form-section > .section-title {
    grid-column: 1 / -1;
}

#screen-event-card .form-section .field {
    margin: 0;
}

#screen-event-card .form-section .field.col-2 {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    #screen-event-card .form-section {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px;
    }
}

/* Grid helpers (used by the mock) */
#screen-event-card .grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    #screen-event-card .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ===== Event Card: global subtle input background ===== */
#screen-event-card input,
#screen-event-card .input,
#screen-event-card select,
#screen-event-card textarea {
    background-color: var(--white) !important;
    transition: background-color .4s ease !important;
}

/* Order table inputs should always look white (as if focused) */
#screen-event-card .order-table-cell input,
#screen-event-card .order-table-cell .input,
#screen-event-card .order-table-cell select {
    background-color: var(--white) !important;
}

#screen-event-card .order-table-cell input[type="number"],
#screen-event-card .order-table-cell input[inputmode="decimal"],
#screen-event-card .order-table-cell .input[type="number"],
#screen-event-card .order-table-cell .input[inputmode="decimal"] {
    text-align: center;
}

#screen-event-card .order-table-cell input[type="number"]::-webkit-outer-spin-button,
#screen-event-card .order-table-cell input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#screen-event-card .order-table-cell input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Qty column: reduce width by 50%, center header, shrink input */
#screen-event-card .order-table-head.lines-grid,
#screen-event-card .order-table-row.lines-grid {
    grid-template-columns: 52px 3fr 0.6fr 0.55fr 0.75fr 40px;
}

#screen-event-card .order-table-head-cell {
    text-align: center;
    justify-content: center;
}

#screen-event-card .order-table-head.lines-grid .order-table-head-cell:nth-child(3),
#screen-event-card .order-table-row.lines-grid .order-table-cell:nth-child(3) {
    padding-inline: 2px;
    text-align: center;
    justify-content: center;
}

#screen-event-card .order-table-row.lines-grid .order-table-cell:nth-child(5) {
    text-align: center;
    justify-content: center;
}

/* Order/Contract tabs: hard-align header and body columns */
#screen-event-card .event-order-tab-panel .order-table {
    --ec-order-lines-template: 52px minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) 40px;
}

#screen-event-card .event-order-tab-panel .order-table-head.lines-grid,
#screen-event-card .event-order-tab-panel .order-table-row.lines-grid {
    display: grid;
    grid-template-columns: var(--ec-order-lines-template) !important;
}

#screen-event-card .event-order-tab-panel .order-table-head-cell,
#screen-event-card .event-order-tab-panel .order-table-cell {
    min-width: 0;
    box-sizing: border-box;
}

#screen-event-card .documents-editor-container.print-preview-modal .order-doc-edit .order-table-head.lines-grid,
#screen-event-card .documents-editor-container.print-preview-modal .order-doc-edit .order-table-row.lines-grid {
    display: grid;
    grid-template-columns: 52px 3fr 0.9fr 0.95fr 40px;
}

/* ===== Event Card: uniform input height (42px) across all tabs ===== */
#screen-event-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
#screen-event-card .input:not(textarea),
#screen-event-card select {
    height: 42px !important;
    box-sizing: border-box;
}

#screen-event-card input:focus,
#screen-event-card .input:focus,
#screen-event-card select:focus,
#screen-event-card textarea:focus {
    background-color: var(--white) !important;
}

/* ===== Basic-details: Labels ===== */
#screen-event-card .form-section .label,
#screen-event-card .form-section label.label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    padding-right: 13px;
    margin-bottom: 6px;
    line-height: 1.4;
}

/* ===== Basic-details: Inputs / selects / textareas ===== */
#screen-event-card .form-section .input,
#screen-event-card .form-section input:not([type="checkbox"]):not([type="radio"]),
#screen-event-card .form-section select,
#screen-event-card .form-section textarea {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    background-color: var(--lightgray);
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background-color .4s ease;
}

#screen-event-card .form-section textarea {
    height: auto;
    padding: 10px 12px;
}

#screen-event-card .form-section .input:focus,
#screen-event-card .form-section input:not([type="checkbox"]):not([type="radio"]):focus,
#screen-event-card .form-section select:focus,
#screen-event-card .form-section textarea:focus {
    border-color: var(--primary);
    background-color: var(--white) !important;
}

/* ===== Basic-details: Checkbox clean styling ===== */
#screen-event-card .form-section input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--primary);
}

#screen-event-card .form-section .field:has(input[type="checkbox"]):not(:has(.multi-select)) > div:not(.field-error) {
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
}

#screen-event-card .form-section .field:has(input[type="checkbox"]):not(:has(.multi-select)) .label {
    margin-bottom: 0;
}

/* ===== Basic-details: Fields – uniform vertical layout ===== */
#screen-event-card .form-section .field > div:not(.field-error) {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

/* ===== Basic-details: Phones editor – clean grid ===== */
#screen-event-card .form-section .phones-editor {
    margin-top: 9px;
    width: 100%;
    overflow: visible;
}

#screen-event-card .form-section .phones-editor .phones-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
    overflow: visible;
}

#screen-event-card .form-section .phones-editor .phone-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
    box-sizing: border-box;
    position: relative;
    width: 100%;
}

#screen-event-card .form-section .phones-editor .phone-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#screen-event-card .form-section .phones-editor .phone-col .input,
#screen-event-card .form-section .phones-editor .phone-col input[type="text"],
#screen-event-card .form-section .phones-editor .phone-col input[type="tel"] {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 12px !important;
    box-sizing: border-box;
}

#screen-event-card .form-section .phones-editor .phone-col-label {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    direction: rtl;
    font-size: 13px;
    color: var(--black);
    font-weight: 600;
    line-height: 1.4;
    height: 25px;
    margin-bottom: 0;
    text-align: right;
}

#screen-event-card .form-section .field:has(.phones-editor) > label.label {
    display: none;
}

#screen-event-card .form-section .phones-editor .phone-actions {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: absolute;
    left: 0;
    bottom: 0;
    transform: translateX(calc(-100% - 18px));
    height: 42px;
    width: 42px;
}

#screen-event-card .form-section .phones-editor .phone-side {
    display: flex;
    align-items: center;
    min-width: 0;
    width: 100%;
}

#screen-event-card .form-section .phones-editor .phone-side .autocomplete-wrapper {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
}

#screen-event-card .form-section .phones-editor .phone-side .input,
#screen-event-card .form-section .phones-editor .phone-side input[type="text"],
#screen-event-card .form-section .phones-editor .phone-side input[type="tel"] {
    height: 42px;
    width: 100%;
    box-sizing: border-box;
}

#screen-event-card .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(15, 23, 42, 0.12);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
    text-align: right;
    padding: 4px 0;
}

#screen-event-card .autocomplete-list:not(.hidden) {
    animation: ecAcSlideDown 0.2s ease-out;
}

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

#screen-event-card .autocomplete-list .auto-item:last-child {
    border-bottom: none;
}

#screen-event-card .autocomplete-list .auto-item:hover {
    background: var(--bg-app);
}

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

#screen-event-card .autocomplete-list .ac-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}

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

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

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





/* ===== Basic-details: Required star ===== */
#screen-event-card .form-section .required-mark {
    color: var(--red);
    font-weight: 700;
}

/* ===== Event Card: Tasks (new JS-generated structure) ===== */
#screen-event-card .event-tasks-card {
    background: transparent;
    border: 0;
    padding: 0;
}

#screen-event-card .event-tasks-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
}

#screen-event-card .event-tasks-title-row .editor-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
}

/* Tasks: new-task form – card-like appearance with clear separation */
#screen-event-card .event-tasks-card .lead-inline-task-form {
    margin: 0 0 24px;
    padding: 18px;
    background: var(--bg-app);
    border: 0;
    border-radius: 14px;
    position: relative;
}

#screen-event-card .event-tasks-card .lead-inline-task-form .lead-reminder-add-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 0;
    padding-bottom: 0;
}

#screen-event-card .event-tasks-card .lead-inline-task-form .lead-reminder-message-input {
    width: 100%;
    background-color: var(--white) !important;
    border: 1px solid var(--border-soft);
}

#screen-event-card .event-tasks-card .lead-inline-task-form .lead-reminder-second-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

#screen-event-card .event-tasks-card .lead-inline-task-form .lead-reminder-datetime-picker {
    flex: 1 1 180px;
    min-width: 0;
}

#screen-event-card .event-tasks-card .lead-inline-task-form .lead-reminder-date-picker,
#screen-event-card .event-tasks-card .lead-inline-task-form .lead-reminder-time-picker {
    flex: 1 1 180px;
    min-width: 0;
}

#screen-event-card .event-tasks-card .lead-reminder-datetime-picker .tw-dp-trigger {
    height: 38px;
    max-width: 220px;
    min-width: 180px;
    font-size: 13px;
    padding: 0 12px;
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--primary);
    font-weight: 600;
}

#screen-event-card .event-tasks-card .lead-inline-task-form .lead-task-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

#screen-event-card .event-tasks-card .lead-inline-task-form .lead-task-buttons .btn {
    font-size: 13px;
    padding: 6px 14px;
    white-space: nowrap;
}

#screen-event-card .event-tasks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

@media (max-width: 600px) {
    #screen-event-card .event-tasks-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

#screen-event-card .event-tasks-col {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: var(--white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

#screen-event-card .event-tasks-col:last-child {
    background: var(--bg-app);
    border-color: var(--border-soft);
}

#screen-event-card .event-tasks-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-soft);
    direction: rtl;
}

#screen-event-card .event-tasks-col-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

#screen-event-card .event-tasks-col-header--done .event-tasks-col-title {
    color: #10b981;
}

#screen-event-card .event-tasks-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    border: none;
}

#screen-event-card .event-tasks-badge--done {
    color: #10b981;
}

#screen-event-card .event-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    flex: 1 1 auto;
    min-height: 0;
}

/* Tasks: edit mode uses `.lead-reminder-add-row` inside the list; normalize it */
#screen-event-card .event-tasks-card .event-tasks-list .lead-reminder-add-row {
    margin-top: 0;
    padding: 14px;
    border: 1px solid var(--primary);
    border-radius: 12px;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

#screen-event-card .event-tasks-card .event-tasks-list .lead-reminder-add-row .input {
    height: 42px;
    border-radius: 10px;
    font-size: 14px;
}

#screen-event-card .event-tasks-card .event-tasks-list .lead-reminder-second-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

#screen-event-card .event-tasks-card .event-tasks-list .lead-reminder-datetime-picker {
    flex: 1 1 180px;
    min-width: 0;
}

#screen-event-card .event-tasks-card .event-tasks-list .lead-reminder-date-picker,
#screen-event-card .event-tasks-card .event-tasks-list .lead-reminder-time-picker {
    flex: 1 1 180px;
    min-width: 0;
}

#screen-event-card .event-tasks-card .event-tasks-list .lead-task-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

#screen-event-card .event-tasks-card .event-tasks-list .lead-task-buttons .btn {
    font-size: 13px;
    padding: 6px 14px;
    white-space: nowrap;
}

#screen-event-card .event-task-card {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--white);
    padding: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    transition: box-shadow .2s ease;
}

#screen-event-card .event-task-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

#screen-event-card .event-task-card.is-done {
    opacity: 0.75;
}

#screen-event-card .event-task-check {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid var(--border-soft);
    background: var(--white);
    margin-top: 2px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

#screen-event-card .event-task-content {
    flex: 1 1 auto;
    min-width: 0;
}

#screen-event-card .event-task-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
    margin: 0 0 4px;
    line-height: 1.25;
}

#screen-event-card .event-task-meta {
    font-size: 12px;
    color: var(--text2);
    margin: 0;
    line-height: 1.3;
}

#screen-event-card .event-task-card .lead-task-edit-btn {
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 12px;
}

#screen-event-card .event-tasks-empty {
    color: var(--text2);
    padding: 18px 14px;
    text-align: center;
    font-size: 13px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--bg-app);
}

/* ===== Event Card: Calendar/Diary tab design alignment ===== */

/* When the meetings-diary 3-col layout is active, give the main column more room */
#screen-event-card .event-editor-desktop-wrapper:has(.diary-module.meeting-three-col) {
    grid-template-columns: minmax(0, 1fr) calc((100% - 42px) / 4);
    gap: 14px;
    padding: 18px 22px 22px;
}

/* Diary/Meetings tab: prevent centered panel and align content to the right edge */
#screen-event-card .event-card-section .form-tab-panel.active:has(.event-schedule-area) {
    max-width: none;
    margin: 0;
    min-height: 125vh;
}

#screen-event-card .event-card-section .form-tab-panel.active:has(.event-schedule-area) > .content-scroll {
    display: block;
    width: 100%;
    margin-top: 10px;
}

@media (min-width: 768px) {
    #screen-event-card .event-card-section .form-tab-panel.active:has(.event-schedule-area) > .content-scroll {
        height: auto;
        max-height: none;
        overflow: visible;
    }
}

#screen-event-card .event-card-section .form-tab-panel.active:has(.event-schedule-area) .form-container[data-ec-container="1"] {
    max-width: none;
    width: 100%;
    margin: 0;
}

#screen-event-card .event-card-section .form-tab-panel.active:has(.event-tasks-card) .form-container[data-ec-container="1"] {
    width: 100%;
    max-width: 700px;
    margin-inline: auto;
}

#screen-event-card .event-schedule-summary {
    border-radius: 14px;
    padding: 14px 16px;
}

#screen-event-card .event-schedule-status-badge {
    border-radius: 999px;
}

/* Diary: two cards (visuals + form) with consistent padding */
#screen-event-card .diary-module {
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#screen-event-card .diary-visuals,
#screen-event-card .diary-form {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 18px;
    box-sizing: border-box;
}

/* The base diary styles add an inner divider; remove it for the card layout */
#screen-event-card .diary-form {
    padding-inline-start: 18px;
}

#screen-event-card .diary-visuals {
    padding-inline-end: 18px;
}

#screen-event-card .diary-form-header {
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
}

#screen-event-card .diary-visuals {
    align-items: stretch;
    justify-content: flex-start;
}

#screen-event-card .diary-calendar-widget {
    border-radius: 14px;
    padding: 22px;
    max-width: none;
    width: 100%;
}

#screen-event-card .diary-calendar-widget .diary-cal-header {
    margin-bottom: 13px;
}

#screen-event-card .diary-calendar-widget .diary-month-title {
    font-size: 25px;
}

#screen-event-card .diary-calendar-widget .diary-cal-nav-btn {
    font-size: 13px;
    padding: 5px;
}

#screen-event-card .diary-calendar-widget .diary-cal-grid {
    gap: 7px;
}

#screen-event-card .diary-calendar-widget .diary-cal-day-name {
    font-size: 12px;
    margin-bottom: 4px;
}

#screen-event-card .diary-calendar-widget .diary-cal-day {
    font-size: 13px;
    border-radius: 7px;
}

#screen-event-card .diary-agenda-card {
    border-radius: 12px 8px 8px 12px;
}

#screen-event-card .diary-agenda-list {
    width: 100%;
    align-self: stretch;
}

/* Meetings mode: 3 components – middle (form) slightly wider */
#screen-event-card .diary-module.meeting-three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
    width: 100%;
    max-width: none;
    padding: 0;
}

#screen-event-card .diary-module.meeting-three-col .diary-visuals,
#screen-event-card .diary-module.meeting-three-col .diary-form,
#screen-event-card .diary-module.meeting-three-col .meeting-calendar-col {
    min-width: 0;
    height: auto;
    align-self: stretch;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

#screen-event-card .diary-module.meeting-three-col .diary-form {
    position: relative;
    overflow: visible;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 16px;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

#screen-event-card .diary-module.meeting-three-col .diary-visuals.meeting-list-col {
    position: relative;
    overflow: visible;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 16px;
    background: var(--bg-app);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

#screen-event-card .diary-module.meeting-three-col .meeting-list-header {
    display: none !important;
    position: relative;
    justify-content: center;
    min-height: 36px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 0;
}

#screen-event-card .diary-module.meeting-three-col .diary-agenda-items {
    display: flex !important;
}

#screen-event-card .diary-module.meeting-three-col .diary-agenda-items .diary-agenda-empty {
    display: none !important;
}

#screen-event-card .diary-module.meeting-three-col .diary-agenda-main-title {
    top: 0;
    font-size: 14px;
    color: var(--text2);
}

#screen-event-card .diary-module.event-three-col .diary-agenda-main-title {
    position: absolute;
    top: 0;
    right: 16px;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--white);
    padding: 0 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text2);
    line-height: 1.4;
}

#screen-event-card .diary-module.meeting-three-col .meeting-list-header > .meeting-list-new-btn:nth-child(2) {
    position: absolute;
    inset-inline-start: auto;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex !important;
    visibility: visible;
    opacity: 1;
}

#screen-event-card .diary-module.meeting-three-col .meeting-list-header > .meeting-list-new-btn:nth-child(2).hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

#screen-event-card .diary-module.meeting-three-col .meeting-list-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--black);
    text-align: center;
    margin-bottom: 10px;
    width: 100%;
}

#screen-event-card .diary-module.meeting-three-col .mtg-editor-title {
    position: absolute;
    top: -2px;
    right: 16px;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--white);
    padding: 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text2);
    text-align: right;
    width: auto;
    margin: 0;
    padding-bottom: 0;
}

#screen-event-card .diary-module.meeting-three-col .meeting-list-new-btn {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    min-height: 34px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

#screen-event-card .diary-module.meeting-three-col .meeting-list-new-btn:hover {
    background: var(--lightblue);
    border-color: var(--primary);
}

#screen-event-card .diary-module.meeting-three-col .meeting-list-new-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#screen-event-card .diary-module.meeting-three-col .meeting-agenda-add-btn .fa-plus {
    margin-top: 2px;
}

#screen-event-card .diary-module.meeting-three-col .meeting-agenda-add-btn {
    width: 100%;
    align-self: stretch;
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 12px;
    border: 1px dashed var(--primary);
    padding: 14px 16px;
    justify-content: center;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
}

#screen-event-card .diary-module.meeting-three-col .meeting-agenda-add-placeholder {
    width: 100%;
    align-self: stretch;
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 12px;
    border: 1px dashed var(--border-soft);
    background: var(--white);
    color: var(--text2);
    text-align: center;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 400;
}

#screen-event-card .diary-module.meeting-three-col .meeting-note-toggle-btn,
#screen-event-card .diary-module.meeting-three-col .meeting-note-toggle-btn:hover {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-height: 0;
    color: var(--text2);
}

#screen-event-card .diary-module.meeting-three-col .meeting-note-toggle-field {
    border-bottom: 0 !important;
}

#screen-event-card .diary-module.meeting-three-col .diary-agenda-empty {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 20px;
    background: var(--bg-app);
    position: relative;
    top: -5px;
}

#screen-event-card .diary-module.meeting-three-col .mtg-card {
    background: var(--lightblue);
    border: 1px solid var(--border-soft);
    border-right: 4px solid var(--primary-2);
    border-radius: 12px 8px 8px 12px;
    padding: 10px 14px;
    overflow: visible;
    box-shadow: none;
}

#screen-event-card .diary-module.meeting-three-col .mtg-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

#screen-event-card .diary-module.meeting-three-col .mtg-card.active {
    border-color: var(--primary);
    border-right-color: var(--primary);
    background: var(--lightblue);
}

#screen-event-card .diary-module.meeting-three-col .mtg-card.mtg-card-other-day,
#screen-event-card .diary-module.meeting-three-col .mtg-card.mtg-card-other-day.active {
    background: var(--lbl13);
}

#screen-event-card .diary-module.meeting-three-col .mtg-card-phone {
    color: var(--text2) !important;
}

#screen-event-card .diary-module.meeting-three-col .mtg-card-info {
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
}

#screen-event-card .diary-module.meeting-three-col .mtg-card-action {
    color: var(--primary);
    padding-inline-start: 0;
    margin-left: 0;
}

#screen-event-card .diary-module.meeting-three-col .mtg-card-meta > .mtg-card-action:not(.mtg-card-action-edit) {
    transform: translateX(5px);
}

#screen-event-card .diary-module.meeting-three-col .mtg-card-left {
    align-items: flex-start;
    gap: 2px;
}

#screen-event-card .diary-module.meeting-three-col .mtg-card-action {
    align-self: flex-start;
}

#screen-event-card .diary-module.meeting-three-col .mtg-card .mtg-card-left .mtg-card-action:not(.mtg-card-action-edit) {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11.97px;
    margin: 0;
    padding: 0;
}

#screen-event-card .diary-module.meeting-three-col .mtg-card.mtg-card-neutral .mtg-card-action:not(.mtg-card-action-edit) {
    top: calc(50% + 2px);
}

#screen-event-card .diary-module.meeting-three-col .mtg-card.active .mtg-card-left .mtg-card-action.mtg-card-action-edit {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    line-height: 1;
    margin: 0;
    padding: 0;
}

#screen-event-card .diary-module.meeting-three-col .diary-calendar-widget {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 16px;
    padding-top: 31px;
    background: var(--bg-app);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid {
    margin-top: 10px;
    row-gap: 15px;
    column-gap: 15px;
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid .field > div > label,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid .field > label {
    display: none !important;
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid .field {
    position: relative;
    padding-top: 8px;
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid .field label {
    position: absolute;
    top: 0;
    right: 12px;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--white);
    padding: 0 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    line-height: 1.2;
    display: inline-block;
    width: auto;
    max-width: calc(100% - 24px);
}

#screen-event-card .diary-module:not(.meeting-three-col) .diary-form-grid .field {
    position: relative;
    padding-top: 8px;
}

#screen-event-card .diary-module:not(.meeting-three-col) .diary-form-grid .field label {
    position: absolute;
    top: 0;
    right: 12px;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--white);
    padding: 0 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    line-height: 1.2;
    display: inline-block;
    width: auto;
    max-width: calc(100% - 24px);
    font-family: inherit;
    letter-spacing: 0;
}

#screen-event-card .diary-module:not(.meeting-three-col) .diary-form-grid .input,
#screen-event-card .diary-module:not(.meeting-three-col) .diary-form-grid select,
#screen-event-card .diary-module:not(.meeting-three-col) .diary-form-grid textarea,
#screen-event-card .diary-module:not(.meeting-three-col) .diary-form-grid .tw-dp-trigger,
#screen-event-card .diary-module:not(.meeting-three-col) .diary-form-grid .tw-time-input-wrapper input {
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background-color: var(--white);
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid .input,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid select,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid textarea,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid .tw-dp-trigger,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid .tw-dp-trigger .tw-dp-value,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid .tw-time-input,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid .tw-time-input-wrapper input {
    font-size: 15px;
    font-weight: 400;
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid .tw-time-input,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid .tw-time-input-wrapper input {
    font-size: 15px;
    font-weight: 400;
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid .tw-date-picker .tw-dp-value {
    color: var(--placeholder);
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid div:not(.has-value) > .tw-date-picker .tw-dp-trigger {
    background: var(--bg-app);
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid .has-value .tw-date-picker .tw-dp-value {
    color: var(--black);
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid textarea.input,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid textarea {
    font-size: 15px;
    font-weight: 400;
    min-height: 84px;
    border-radius: 6px !important;
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid select.input,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid select {
    font-size: 15px;
    font-weight: 400;
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid .tw-time-input::placeholder,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid .tw-time-input-wrapper input::placeholder {
    font-size: 15px;
    font-weight: 400;
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid textarea.input::placeholder,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid textarea::placeholder {
    font-size: 15px;
    font-weight: 400;
}

#screen-event-card .diary-module.meeting-three-col .diary-form-grid .input,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid select,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid textarea,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid .tw-dp-trigger,
#screen-event-card .diary-module.meeting-three-col .diary-form-grid .tw-time-input-wrapper input {
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background-color: var(--white);
}

#screen-event-card .diary-module.meeting-three-col .diary-module .input,
#screen-event-card .diary-module.meeting-three-col .input,
#screen-event-card .diary-module.meeting-three-col textarea,
#screen-event-card .diary-module.meeting-three-col select {
    border-radius: 8px;
    font-size: 14px;
    padding: 10px 12px;
}

#screen-event-card .diary-module.meeting-three-col .mtg-attendance-toggle {
    padding: 4px;
    border-radius: 10px;
    gap: 4px;
}

#screen-event-card .diary-module.meeting-three-col .mtg-att-btn {
    border-radius: 8px;
    min-height: 40px;
    font-size: 15px;
}

#screen-event-card .diary-module.meeting-three-col .meeting-note-toggle-btn {
    font-size: 15px;
}

#screen-event-card .diary-module.meeting-three-col .diary-btn-group {
    margin-top: 10px;
    padding-top: 14px;
    border-top: 0;
}

#screen-event-card .diary-module.meeting-three-col .diary-btn-group .btn.btn-primary {
    min-height: 44px;
    font-size: 16px;
    font-weight: 400;
}

#screen-event-card .diary-module.meeting-three-col .diary-btn-group .btn.btn-primary.is-diary-add-mode {
    font-size: 21px;
}

#screen-event-card .diary-module.meeting-three-col .diary-btn-group .btn.btn-primary.is-diary-add-mode svg {
    width: 22.05px;
    height: 22.05px;
}

#screen-event-card .diary-module.meeting-three-col .diary-btn-group .btn.btn-primary.is-diary-save-mode {
    height: 64px;
    font-size: 18px;
}

#screen-event-card .diary-module.meeting-three-col .diary-visuals {
    align-items: stretch;
    justify-content: flex-start;
}

#screen-event-card .diary-module.meeting-three-col .diary-agenda-list {
    width: 100%;
    align-self: stretch;
}

#screen-event-card .diary-module.meeting-three-col .diary-agenda-list.meeting-agenda-wrap.meeting-agenda-with-title {
    margin-top: 20px;
}

#screen-event-card .diary-module.meeting-three-col .diary-agenda-items {
    position: relative;
}

#screen-event-card .diary-module.meeting-three-col .diary-agenda-items > .diary-agenda-title:not(.diary-agenda-title-other-meetings) {
    position: absolute;
    top: 0;
    right: 16px;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--white);
    padding: 0 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text2);
    line-height: 1.4;
}

#screen-event-card .diary-module.meeting-three-col .diary-agenda-items > .diary-agenda-title:not(.diary-agenda-title-other-meetings) + .mtg-card {
    margin-top: 12px;
}

#screen-event-card .diary-module.meeting-three-col .diary-agenda-main-title {
    position: absolute;
    top: 0;
    right: 16px;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--white);
    padding: 0 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text2);
    line-height: 1.4;
    border-radius: 1rem;
}

#screen-event-card .diary-module.meeting-three-col .meeting-calendar-col,
#screen-event-card .diary-module.meeting-three-col .meeting-calendar-col.hidden {
    display: flex !important;
}

#screen-event-card .diary-module.meeting-three-col .meeting-calendar-col {
    position: relative;
    overflow: visible;
}

#screen-event-card .diary-module.event-three-col .meeting-calendar-col {
    position: relative;
    overflow: visible;
}

#screen-event-card .diary-module.meeting-three-col .mtg-calendar-col-title {
    position: absolute;
    top: 0;
    right: 16px;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--bg-app);
    padding: 0 8px;
    border-radius: 10px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text1);
    line-height: 1.4;
    border-radius: 1rem;
}

#screen-event-card .diary-module.event-three-col .mtg-calendar-col-title {
    position: absolute;
    top: 0;
    right: 16px;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--bg-app);
    padding: 0 8px;
    border-radius: 10px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text1);
    line-height: 1.4;
}

#screen-event-card .diary-module.meeting-three-col .meeting-calendar-col .meeting-editor-calendar-host,
#screen-event-card .diary-module.meeting-three-col .meeting-calendar-col .meeting-editor-calendar-host.hidden {
    display: block !important;
}

#screen-event-card .diary-module.meeting-three-col .meeting-other-day-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-soft);
}

#screen-event-card .diary-module.meeting-three-col .meeting-other-day-wrap.hidden {
    display: none !important;
}

/* Events mode: 3 components (events of selected day, event form, calendar) */
#screen-event-card .diary-module.event-three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
    width: 100%;
    max-width: none;
    padding: 0;
}

#screen-event-card .diary-module.event-three-col.hide-event-visuals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#screen-event-card .diary-module.event-three-col.hide-event-visuals .diary-visuals {
    display: none !important;
}

#screen-event-card .diary-module.event-three-col .diary-visuals,
#screen-event-card .diary-module.event-three-col .diary-form,
#screen-event-card .diary-module.event-three-col .meeting-calendar-col {
    min-width: 0;
    height: auto;
    align-self: stretch;
}

#screen-event-card .diary-module.event-three-col .diary-visuals {
    position: relative;
    overflow: visible;
    align-items: stretch;
    justify-content: flex-start;
}

#screen-event-card .diary-module.event-three-col .diary-agenda-list {
    width: 100%;
    align-self: stretch;
}

#screen-event-card .diary-module.event-three-col .diary-agenda-items {
    margin-top: 20px;
}

#screen-event-card .diary-module.event-three-col .diary-form-grid {
    margin-top: 20px;
}

#screen-event-card .diary-module.event-three-col .diary-form {
    position: relative;
    overflow: visible;
    width: 90%;
    background: var(--bg-app);
}

#screen-event-card .diary-module.event-three-col .event-diary-form-title {
    position: absolute;
    top: 0;
    right: 12px;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--white);
    padding: 0 6px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text2);
    line-height: 1.2;
    display: inline-block;
    width: auto;
    max-width: calc(100% - 24px);
}

#screen-event-card .diary-module.event-three-col .diary-form .field {
    position: relative;
    padding-top: 8px;
    border: none;
    background: transparent;
    padding-inline: 0;
    padding-bottom: 0;
    box-shadow: none;
    gap: 0;
}

#screen-event-card .diary-module.event-three-col .diary-form .field > div:not(.field-error) {
    overflow: visible !important;
}

#screen-event-card .diary-module.event-three-col .diary-form .field > div > label,
#screen-event-card .diary-module.event-three-col .diary-form .field > label,
#screen-event-card .diary-module.event-three-col .diary-form .field .status-combo-group > label {
    display: none !important;
}

#screen-event-card .diary-module.event-three-col .diary-form .field > label,
#screen-event-card .diary-module.event-three-col .diary-form .field > .label {
    position: absolute;
    top: 0;
    right: 12px;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--white);
    padding: 0 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    line-height: 1.2;
    display: inline-block;
    width: auto;
    max-width: calc(100% - 24px);
}

/* status-combo-group nested inside the first .field (evScheduleType) */
#screen-event-card .diary-module.event-three-col .diary-form .field .status-combo-group {
    position: relative;
    padding-top: 8px;
    border: none;
    background: transparent;
    padding-inline: 0;
    padding-bottom: 0;
    gap: 0;
    width: 100%;
}

#screen-event-card .diary-module.event-three-col .diary-form .field .status-combo-group > label {
    position: absolute;
    top: 0;
    right: 12px;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--white);
    padding: 0 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    line-height: 1.2;
    display: inline-block;
    width: auto;
    max-width: calc(100% - 24px);
    height: auto;
}

/* Final override: hide all field titles in diary tabs */
#screen-event-card .diary-module.meeting-three-col .diary-form-grid .field label,
#screen-event-card .diary-module.event-three-col .diary-form .field label,
#screen-event-card .diary-module.event-three-col .diary-form .field .label {
    display: none !important;
}

#screen-event-card .diary-module.event-three-col .diary-form .field.diary-floating-time-start-field > div:not(.field-error) > label,
#screen-event-card .diary-module.event-three-col .diary-form .field.diary-floating-time-end-field > div:not(.field-error) > label {
    position: absolute;
    top: 0;
    right: 12px;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--white);
    padding: 0 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    line-height: 1.2;
    display: inline-block !important;
    width: auto;
    max-width: calc(100% - 24px);
}

#screen-event-card .diary-module.event-three-col .diary-form .field.diary-floating-time-start-field > div:not(.field-error) > label {
    z-index: 99999 !important;
}

#screen-event-card .diary-module.event-three-col .diary-form .field.diary-floating-time-start-field > div:not(.field-error),
#screen-event-card .diary-module.event-three-col .diary-form .field.diary-floating-time-end-field > div:not(.field-error) {
    position: relative;
    overflow: visible !important;
}

/* Remove top spacing that was reserved for floating labels */
#screen-event-card .diary-module.meeting-three-col .diary-form-grid .field,
#screen-event-card .diary-module.event-three-col .diary-form .field,
#screen-event-card .diary-module.event-three-col .diary-form .field .status-combo-group {
    padding-top: 0 !important;
}

#screen-event-card .diary-module.event-three-col .diary-form .input,
#screen-event-card .diary-module.event-three-col .diary-form select,
#screen-event-card .diary-module.event-three-col .diary-form textarea,
#screen-event-card .diary-module.event-three-col .diary-form .tw-dp-trigger,
#screen-event-card .diary-module.event-three-col .diary-form .tw-dp-trigger .tw-dp-value,
#screen-event-card .diary-module.event-three-col .diary-form .tw-time-input,
#screen-event-card .diary-module.event-three-col .diary-form .tw-time-input-wrapper input {
    font-size: 15px;
}

#screen-event-card .diary-module.event-three-col .diary-form .input,
#screen-event-card .diary-module.event-three-col .diary-form select,
#screen-event-card .diary-module.event-three-col .diary-form textarea,
#screen-event-card .diary-module.event-three-col .diary-form .tw-dp-trigger,
#screen-event-card .diary-module.event-three-col .diary-form .tw-time-input-wrapper input {
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background-color: var(--white);
}

#screen-event-card .diary-module.event-three-col .diary-form textarea.event-postpone-reason-input,
#screen-event-card .diary-module.event-three-col .diary-form textarea.event-postpone-reason-input:focus {
    background-color: var(--bg-app) !important;
}

#screen-event-card .diary-module.event-three-col .diary-form .input:not(textarea),
#screen-event-card .diary-module.event-three-col .diary-form select,
#screen-event-card .diary-module.event-three-col .diary-form .tw-dp-trigger,
#screen-event-card .diary-module.event-three-col .diary-form .tw-time-input,
#screen-event-card .diary-module.event-three-col .diary-form .tw-time-input-wrapper,
#screen-event-card .diary-module.event-three-col .diary-form .tw-time-input-wrapper input {
    height: 50px !important;
    min-height: 50px;
    box-sizing: border-box;
}

#screen-event-card .diary-module.event-three-col .diary-form .tw-time-input-wrapper .tw-time-input {
    background-color: var(--white) !important;
}

#screen-event-card .diary-module.event-three-col .diary-form .tw-time-input[disabled],
#screen-event-card .diary-module.event-three-col .diary-form .tw-time-input-wrapper input[disabled] {
    pointer-events: none;
}

#screen-event-card .diary-module.event-three-col .diary-form .tw-date-picker .tw-dp-value {
    color: var(--placeholder);
}

#screen-event-card .diary-module.event-three-col .diary-form .tw-date-picker.has-value .tw-dp-value,
#screen-event-card .diary-module.event-three-col .diary-form .has-value .tw-date-picker .tw-dp-value {
    color: var(--black);
}

#screen-event-card .diary-module.event-three-col .diary-btn-group .btn.btn-primary .lucide-check {
    width: 25.3px;
    height: 25.3px;
}

#screen-event-card .diary-module.event-three-col .diary-btn-group .btn.btn-primary:has(.lucide-check) {
    height: 60px;
}

#screen-event-card .diary-module.event-three-col .meeting-calendar-col,
#screen-event-card .diary-module.event-three-col .meeting-calendar-col.hidden {
    display: flex !important;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

#screen-event-card .diary-module.event-three-col .meeting-calendar-col .diary-calendar-widget {
    width: 100%;
    max-width: none;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 16px;
    padding-top: 31px;
    background: var(--bg-app);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

@media (max-width: 800px) {
    #screen-event-card .diary-module {
        gap: 14px;
    }

    #screen-event-card .diary-visuals,
    #screen-event-card .diary-form {
        padding: 14px;
    }
}

/* ===== Document action buttons (quote / contract) ===== */
#screen-event-card .editor-actions-extra {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    background: var(--bg-app);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
}

#screen-event-card .editor-actions-extra .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 400;
    padding: 7px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: var(--white);
    color: var(--black);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

#screen-event-card .editor-actions-extra .btn span {
    font-weight: 400;
}

#screen-event-card .editor-actions-extra .btn:first-child span {
    font-weight: 500;
}

#screen-event-card .editor-actions-extra .btn:first-child {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

#screen-event-card .editor-actions-extra .btn:first-child:hover {
    filter: brightness(1.1);
}

#screen-event-card .editor-actions-extra .btn:last-child,
#screen-event-card .editor-actions-extra .btn.primary,
#screen-event-card .editor-actions-extra .btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

#screen-event-card .editor-actions-extra .btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ===== Order + Contract tab: clean two-column layout (UI only) ===== */

/* Gray surface behind white cards */
#screen-event-card .event-order-tab-panel > .content-scroll {
    background: var(--bg-app);
}

#screen-event-card .event-order-tab-panel .form-container[data-ec-container="1"] {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Top actions bar --- */
#screen-event-card .event-order-tab-panel .order-top-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 0 0 20px;
    margin: 0 0 25px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border-soft);
    border-radius: 0;
}

#screen-event-card .event-order-tab-panel .order-top-actions-bar .btn {
    min-height: 38px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

#screen-event-card .event-order-tab-panel .order-top-actions-bar .btn:hover {
    background: var(--bg-app);
    opacity: 1;
}

#screen-event-card .event-order-tab-panel .order-top-actions-bar .btn:not(.primary):hover {
    transform: translateY(-2px);
    color: var(--primary);
}

#screen-event-card .event-order-tab-panel .order-top-actions-bar .btn.primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(30, 78, 132, 0.2);
}

#screen-event-card .event-order-tab-panel .order-top-actions-bar .btn.primary:hover {
    filter: none;
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    opacity: 1;
    transform: translateY(-2px);
}

/* --- Main 2-column grid --- */
#screen-event-card .event-order-tab-panel .order-contract-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    align-items: start;
    margin-top: -20px;
}

#screen-event-card .event-order-tab-panel .order-contract-main-col {
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-width: 0;
}

#screen-event-card .event-order-tab-panel .order-contract-side-col {
    min-width: 0;
}

/* --- Card surfaces --- */
#screen-event-card .event-order-tab-panel .order-lines-section,
#screen-event-card .event-order-tab-panel .order-quote-notes-section,
#screen-event-card .event-order-tab-panel .order-summary-section,
#screen-event-card .event-order-tab-panel .order-contract-section {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

/* Inner .order-section-card wrappers: transparent (card style is on parent) */
#screen-event-card .event-order-tab-panel .order-summary-section .order-section-card,
#screen-event-card .event-order-tab-panel .order-quote-notes-section .order-section-card,
#screen-event-card .event-order-tab-panel .order-contract-section .order-section-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

/* No bottom-margin on section boxes inside the grid (gap handles spacing) */
#screen-event-card .event-order-tab-panel .order-section-box {
    margin: 0;
}

/* --- Section titles --- */
#screen-event-card .event-order-tab-panel .order-section-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

#screen-event-card .event-order-tab-panel .order-section-title {
    color: var(--primary);
    font-size: 16px;
    font-weight: 800;
    margin: 0;
}

/* --- VAT form group (inside summary card) --- */
#screen-event-card .event-order-tab-panel .order-vat-form-group {
    margin-bottom: 20px;
}

#screen-event-card .event-order-tab-panel .order-vat-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text1);
    margin-bottom: 6px;
}

#screen-event-card .event-order-tab-panel .order-vat-form-group .order-vat-mode-select {
    width: 100%;
    max-width: none;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--white);
    color: var(--text1);
}

/* --- "Add line" row --- */
#screen-event-card .event-order-tab-panel .order-lines-actions-row {
    margin-top: 0;
    display: flex;
    justify-content: space-between;
}

/* Add-line button: text link style (matches mockup) */
#screen-event-card .event-order-tab-panel .order-lines-actions-row .order-btn-add {
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    min-height: unset !important;
    background: var(--bg-app) !important;
    border: none !important;
    border-radius: 8px;
    color: var(--primary) !important;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    transition: background 0.2s;
}

#screen-event-card .event-order-tab-panel .order-lines-actions-row .order-btn-add:hover {
    background: var(--bg-app) !important;
    opacity: 1 !important;
}

#screen-event-card .event-order-tab-panel .order-lines-actions-row .order-btn-add svg {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    stroke: var(--primary) !important;
    color: var(--primary) !important;
}

#screen-event-card .event-order-tab-panel .order-lines-actions-row .order-btn-add:last-child {
    gap: 4px;
}

#screen-event-card .event-order-tab-panel .order-lines-actions-row .order-btn-add:last-child svg {
    width: 12px;
    height: 12px;
}

/* --- Order table --- */
#screen-event-card .event-order-tab-panel .order-table {
    background: var(--white);
    border: none;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 15px;
}

#screen-event-card .event-order-tab-panel .order-table-head {
    background: var(--bg-app);
    border-bottom: 1px solid var(--border-soft);
}

#screen-event-card .event-order-tab-panel .order-table-head-cell {
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    text-align: right;
    padding: 12px 10px !important;
    border-left: none !important;
}

#screen-event-card .event-order-tab-panel .order-table-row {
    border-bottom: 1px solid var(--bg-app);
}

#screen-event-card .event-order-tab-panel .order-table-cell {
    padding: 10px !important;
    border-left: none !important;
    vertical-align: middle;
}

#screen-event-card .event-order-tab-panel .order-preset-cell {
    position: relative;
    overflow: visible;
    padding-inline: 10px !important;
}

#screen-event-card .event-order-tab-panel .order-preset-cell .autocomplete-wrapper {
    position: relative;
}

#screen-event-card .event-order-tab-panel .order-preset-cell::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 19px;
    height: 19px;
    transform: translate(-50%, -50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.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: center;
    background-size: 19px 19px;
    pointer-events: none;
}

#screen-event-card .event-order-tab-panel .order-preset-quick-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    min-width: 0;
    padding-inline: 6px !important;
    padding-left: 6px !important;
    background-image: none;
    text-align: center;
    text-align-last: center;
}

#screen-event-card .event-order-tab-panel .order-preset-quick-select option {
    text-align: right;
}

#screen-event-card .event-order-tab-panel .order-preset-cell .autocomplete-list {
    left: auto;
    right: 0;
    min-width: 220px;
    width: max-content;
    max-width: min(320px, calc(100vw - 24px));
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
    padding: 6px 0;
}

#screen-event-card .event-order-tab-panel .order-preset-cell .autocomplete-list .auto-item {
    gap: 4px;
    align-items: flex-start;
}

#screen-event-card .event-order-tab-panel .order-preset-cell .autocomplete-list .ac-name {
    width: 100%;
    line-height: 1.35;
}

#screen-event-card .event-order-tab-panel .order-preset-cell .autocomplete-list .ac-source {
    width: 100%;
    justify-content: flex-start;
    color: var(--text2);
}

#screen-event-card .event-order-tab-panel .order-preset-cell-empty {
    pointer-events: none;
}

@media (min-width: 901px) {
    #screen-event-card .event-order-tab-panel .order-table {
        --ec-order-lines-template: 44px minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) 40px;
    }
}

/* Total cell: bold dark text */
#screen-event-card .event-order-tab-panel .order-table-cell .total-cell {
    font-weight: 700;
    color: var(--text1);
}

#screen-event-card .event-order-tab-panel .order-table-cell .input,
#screen-event-card .event-order-tab-panel .order-table-cell input,
#screen-event-card .event-order-tab-panel .order-table-cell select {
    background: var(--bg-app);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    transition: 0.2s;
    color: var(--text1);
}

#screen-event-card .event-order-tab-panel .order-table-cell .input:focus,
#screen-event-card .event-order-tab-panel .order-table-cell input:focus,
#screen-event-card .event-order-tab-panel .order-table-cell select:focus {
    border-color: var(--primary);
    background: var(--white);
}

/* Delete button inside order table: transparent, gray, red on hover */
#screen-event-card .event-order-tab-panel .order-delete-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    direction: ltr;
    padding-inline-end: 0 !important;
}

#screen-event-card .event-order-tab-panel .order-delete-cell .order-line-delete-btn {
    background: transparent !important;
    border: none !important;
    color: var(--border-soft);
    width: auto;
    height: auto;
    min-width: unset;
    min-height: unset;
    padding: 5px;
    border-radius: 0;
    transition: color 0.2s;
}

#screen-event-card .event-order-tab-panel .order-delete-cell .order-line-delete-btn:hover {
    color: var(--danger);
    background: transparent !important;
}

#screen-event-card .event-order-tab-panel .order-delete-cell .order-line-delete-btn svg {
    width: 16px;
    height: 16px;
}

/* --- Financial summary card (sticky sidebar) --- */
#screen-event-card .event-order-tab-panel .order-summary-section {
    position: sticky;
    top: 20px;
}

#screen-event-card .event-order-tab-panel .order-summary-wrap {
    max-width: none;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

/* Summary content wrapper */
#screen-event-card .event-order-tab-panel .order-summary-content {
    display: flex;
    flex-direction: column;
}

/* All summary rows: dashed bottom border */
#screen-event-card .event-order-tab-panel .order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-soft);
    font-size: 14px;
}

#screen-event-card .event-order-tab-panel .order-summary-row .leads-history-meta {
    color: var(--text2);
    font-size: 13px;
}

#screen-event-card .event-order-tab-panel .order-summary-row .leads-history-text {
    color: var(--black);
    font-weight: 700;
    font-size: 16px;
}

/* Grand total row */
#screen-event-card .event-order-tab-panel .order-summary-row.grand-total {
    border-bottom: 0;
    padding: 14px 16px;
    margin-top: 12px;
    border-top: none;
    background: var(--lightblue);
    border-radius: 12px;
}

#screen-event-card .event-order-tab-panel .order-summary-row.grand-total .leads-history-meta {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
}

#screen-event-card .event-order-tab-panel .order-summary-row.grand-total .leads-history-text {
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
}

/* --- Notes & Contract editors --- */
#screen-event-card .event-order-tab-panel .order-quote-notes-content,
#screen-event-card .event-order-tab-panel .order-contract-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#screen-event-card .event-order-tab-panel .order-quote-notes-content .label,
#screen-event-card .event-order-tab-panel .order-contract-content .label {
    color: var(--text1);
    font-size: 13px;
    font-weight: 600;
}

#screen-event-card .event-order-tab-panel .order-quote-notes-content textarea.input {
    min-height: 110px;
    padding: 15px;
    background: var(--bg-app);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    font-size: 14px;
    transition: 0.2s;
}

#screen-event-card .event-order-tab-panel .order-quote-notes-content textarea.input:focus {
    border-color: var(--primary);
    background: var(--white);
}

#screen-event-card .event-order-tab-panel .order-contract-content .richtext-wrap {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    overflow: hidden;
}

#screen-event-card .event-order-tab-panel .order-contract-content .richtext-toolbar {
    background: var(--bg-app);
    border-bottom: 1px solid var(--border-soft);
    padding: 10px 15px;
}

#screen-event-card .event-order-tab-panel .order-contract-content .richtext-editor {
    min-height: 200px;
    padding: 20px;
    background: var(--white);
    font-size: 14px;
    line-height: 1.6;
}

/* --- Responsive: single column on narrow screens --- */
@media (max-width: 980px) {
    #screen-event-card .event-order-tab-panel .order-contract-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    #screen-event-card .event-order-tab-panel .order-summary-section {
        position: static;
        top: auto;
    }

    #screen-event-card .event-order-tab-panel .order-contract-main-col {
        gap: 18px;
    }
}

/* ===== Event Card: Order + Payments tab design alignment ===== */
#screen-event-card .order-section-box {
    margin: 0 0 16px;
}

#screen-event-card .order-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

#screen-event-card .order-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
    margin: 0;
}

#screen-event-card .order-section-card {
    border-radius: 14px;
    padding: 14px 16px;
}

#screen-event-card .event-card-suppliers-tab {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#screen-event-card .event-card-suppliers-tab > .font-sml {
    text-align: center;
}

#screen-event-card .event-card-suppliers-summary,
#screen-event-card .event-card-suppliers-list,
.event-card-suppliers-modal-stack,
.event-card-suppliers-modal-results {
    display: grid;
    gap: 12px;
}

#screen-event-card .event-card-suppliers-summary {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

#screen-event-card .event-card-suppliers-summary-card,
#screen-event-card .event-card-supplier-item,
.event-card-suppliers-modal-result-item {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: var(--white);
}

#screen-event-card .event-card-suppliers-summary-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
}

#screen-event-card .event-card-suppliers-summary-label,
#screen-event-card .event-card-supplier-subtitle,
#screen-event-card .event-card-supplier-metric-label,
.event-card-suppliers-modal-kicker,
.event-card-suppliers-modal-result-meta {
    color: var(--text1);
    font-size: 12px;
}

#screen-event-card .event-card-suppliers-summary-value,
#screen-event-card .event-card-supplier-name,
#screen-event-card .event-card-supplier-metric-value,
.event-card-suppliers-modal-result-name {
    color: var(--primary);
    font-weight: 800;
}

#screen-event-card .event-card-suppliers-summary-value {
    font-size: 20px;
    line-height: 1.1;
}

#screen-event-card .event-card-supplier-item {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}

#screen-event-card .event-card-supplier-head,
#screen-event-card .event-card-supplier-actions,
.event-card-suppliers-modal-toolbar,
.event-card-suppliers-modal-result-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

#screen-event-card .event-card-supplier-head-main,
#screen-event-card .event-card-supplier-chips,
.event-card-suppliers-modal-result-main,
.event-card-suppliers-modal-result-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

#screen-event-card .event-payments-tab-panel .event-card-suppliers-summary {
    gap: 10px;
}

#screen-event-card .event-payments-tab-panel .event-card-suppliers-summary-card {
    gap: 4px;
    padding: 12px;
}

#screen-event-card .event-payments-tab-panel .event-card-supplier-item {
    gap: 10px;
    padding: 12px;
}

#screen-event-card .event-payments-tab-panel .event-card-supplier-head,
#screen-event-card .event-payments-tab-panel .event-card-supplier-actions {
    gap: 10px;
}

#screen-event-card .event-payments-tab-panel .event-card-supplier-head-main,
#screen-event-card .event-payments-tab-panel .event-card-supplier-chips {
    gap: 6px;
}

#screen-event-card .event-payments-tab-panel .event-card-suppliers-summary-value {
    font-size: 18px;
}

#screen-event-card .event-payments-tab-panel .event-card-supplier-actions .btn {
    min-height: 34px;
    padding: 6px 12px;
}

#screen-event-card .event-payments-tab-panel .event-card-supplier-actions .btn[data-ec-summary-action="finance-details"] {
    flex: 0 1 70%;
    max-width: 70%;
    margin-inline: auto;
}

#screen-event-card .event-card-supplier-name {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

#screen-event-card .event-card-supplier-chips,
#screen-event-card .event-card-supplier-actions,
.event-card-suppliers-modal-result-actions,
.event-card-suppliers-modal-toolbar {
    flex-direction: row;
}

#screen-event-card .event-card-supplier-chips,
.event-card-suppliers-modal-toolbar {
    align-items: center;
}

#screen-event-card .event-card-supplier-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--bg-app);
    color: var(--text1);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

#screen-event-card .event-card-supplier-chip.tone-success {
    color: var(--lbl14);
    border-color: var(--lbl14);
}

#screen-event-card .event-card-supplier-chip.tone-info {
    color: var(--primary);
    border-color: var(--primary);
}

#screen-event-card .event-card-supplier-chip.tone-danger {
    color: var(--delete);
    border-color: var(--delete);
}

#screen-event-card .event-card-supplier-meta-grid,
.event-card-suppliers-modal-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

#screen-event-card .event-card-supplier-metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--bg-app);
}

#screen-event-card .event-card-supplier-metric-value {
    font-size: 15px;
    line-height: 1.3;
    color: var(--black);
}

#screen-event-card .event-card-supplier-actions .btn {
    flex: 1 1 160px;
    min-width: 0;
    min-height: 36px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    transition: background-color 0.2s, transform 0.2s;
}

.event-card-suppliers-modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 2552;
}

.event-card-suppliers-modal-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

.event-card-suppliers-modal-overlay.hidden {
    display: none;
}

.event-card-suppliers-modal {
    width: min(920px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--white) 0%, var(--bg-app) 100%);
    border: 1px solid var(--border-soft);
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px) scale(0.985);
    transition: transform 0.24s ease, opacity 0.24s ease;
    overflow: hidden;
}

.event-card-suppliers-modal.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.event-card-suppliers-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 28px 18px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.96);
    flex: 0 0 auto;
}

.event-card-suppliers-modal-close {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--white);
    color: var(--primary);
    cursor: pointer;
}

.event-card-suppliers-modal-close svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.event-card-suppliers-modal-title {
    margin: 0;
    color: var(--primary);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.event-card-suppliers-modal-header-spacer {
    width: 40px;
    min-width: 40px;
}

.event-card-suppliers-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px 28px 28px;
    overflow: auto;
}

.event-card-suppliers-modal-stack {
    min-width: 0;
}

.event-card-suppliers-modal-choice {
    min-height: 52px;
    width: 100%;
}

.event-card-suppliers-search-field,
.event-card-suppliers-modal-form-grid .field,
.event-card-suppliers-modal-form-grid .field.field-span-2 {
    min-width: 0;
}

.event-card-suppliers-modal-form-grid .field.field-span-2 {
    grid-column: 1 / -1;
}

.event-card-suppliers-modal-form-grid textarea.input {
    min-height: 110px;
    resize: vertical;
}

.event-card-suppliers-modal-results {
    min-width: 0;
}

.event-card-suppliers-modal-result-item {
    padding: 14px 16px;
}

.event-card-pending-invite-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 99999;
}

.event-card-pending-invite-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.event-card-pending-invite-modal {
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    box-sizing: border-box;
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 34px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28);
    padding: 32px 24px 24px;
    text-align: center;
    transform: translateY(14px) scale(0.985);
    transition: transform 0.24s ease;
}

.event-card-pending-invite-overlay.is-open .event-card-pending-invite-modal {
    transform: translateY(0) scale(1);
}

.event-card-pending-invite-icon-header {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--primary);
}

.event-card-pending-invite-icon-header svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
    transform: rotate(180deg);
}

.event-card-pending-invite-title {
    margin: 0 0 24px;
    color: #1e293b;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.event-card-pending-invite-form {
    display: flex;
    flex-direction: column;
}

.event-card-pending-invite-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-card-pending-invite-group {
    margin-bottom: 0;
    text-align: right;
}

.event-card-pending-invite-form .form-label {
    margin-bottom: 6px;
    padding-right: 4px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.event-card-pending-invite-form .form-input {
    min-height: 54px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fcfcfc;
    box-shadow: none;
    font-size: 16px;
}

.event-card-pending-invite-form .form-input:focus {
    border-color: var(--primary);
    background: var(--white);
}

.event-card-pending-invite-template-row {
    justify-content: center;
    gap: 24px;
    margin: 20px 0 16px;
    padding: 0;
}

.event-card-pending-invite-template-row .checkbox-label {
    gap: 8px;
    color: #1e293b;
    font-size: 15px;
}

.event-card-pending-invite-error {
    margin-bottom: 14px;
}

.event-card-pending-invite-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-card-pending-invite-submit {
    min-height: 56px;
    border-radius: 16px;
    font-size: 17px;
}

.event-card-pending-invite-submit .btn-icon svg {
    transform: rotate(180deg);
}

.event-card-pending-invite-cancel {
    width: 100%;
    min-height: 52px;
    max-height: none;
    border-radius: 16px;
    border-color: #e2e8f0;
    color: #1e293b;
    background: var(--white);
    font-size: 16px;
    font-weight: 600;
}

.event-card-suppliers-modal-result-name {
    font-size: 16px;
    line-height: 1.2;
}

.event-card-suppliers-modal-result-actions {
    align-items: center;
}

/* Order tab: clean table (no outer border — card provides the container) */
#screen-event-card .event-card-section .event-order-tab-panel .order-table {
    border: none;
    border-radius: 0;
    overflow: visible;
    background: var(--white);
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-head {
    background: var(--white);
    border-bottom: 1px solid var(--border-soft);
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-head-cell {
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    text-align: right;
    padding: 12px 10px;
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-row {
    border-bottom: 1px solid var(--bg-app);
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-row:last-child {
    border-bottom: 0;
}

/* Payments tab: original card-table style */
#screen-event-card .event-card-section .event-payments-tab-panel .order-table {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
    background: var(--white);
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table {
    max-width: 100%;
    margin-inline: auto;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head {
    background: var(--bg-app);
    border-bottom: 1px solid var(--border-soft);
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row {
    border-bottom: 1px solid var(--border-soft);
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row:last-child {
    border-bottom: 0;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-lines-actions-row {
    margin-top: 8px;
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-btn-add {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 6px;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head-cell {
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    text-align: right !important;
    justify-content: flex-start !important;
    border-left: none !important;
    padding: 12px 10px !important;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-cell {
    border-left: none !important;
    padding: 10px 8px !important;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-cell .input,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-cell input,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-cell select {
    width: 100%;
    height: 42px !important;
    min-height: 42px !important;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    background-color: var(--lightgray) !important;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background-color .4s ease;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-cell .input:focus,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-cell input:focus,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-cell select:focus {
    border-color: var(--primary);
    background-color: var(--white) !important;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table {
    width: 100%;
    max-width: 100%;
}

#screen-event-card .event-card-section .event-payments-tab-panel .content-scroll,
#screen-event-card .event-card-section .event-payments-tab-panel .order-section-box,
#screen-event-card .event-card-section .event-payments-tab-panel .order-section-card {
    overflow-anchor: none;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid {
    column-gap: 8px;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid > .order-table-head-cell,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid > .order-table-cell,
#screen-event-card .event-card-section .event-payments-tab-panel .event-payment-meta-stack,
#screen-event-card .event-card-section .event-payments-tab-panel .event-payment-meta-pair {
    min-width: 0;
    box-sizing: border-box;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid > .order-table-cell:nth-child(1) select,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid > .order-table-cell:nth-child(2) input,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid > .order-table-cell:nth-child(3) input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid > .order-table-cell:nth-child(4) input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Event Card: Payments grid – dynamic columns (Meta) */
#screen-event-card .event-card-section .event-order-tab-panel .order-table-head.payments-grid.cols-3,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid.cols-3,
#screen-event-card .event-card-section .event-order-tab-panel .order-table-row.payments-grid.cols-3,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid.cols-3 {
    grid-template-columns: 1.4fr 1fr 80px;
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-head.payments-grid.cols-4,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid.cols-4,
#screen-event-card .event-card-section .event-order-tab-panel .order-table-row.payments-grid.cols-4,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid.cols-4 {
    grid-template-columns: 1.2fr 0.9fr 1.6fr 80px;
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-head.payments-grid.cols-5,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid.cols-5,
#screen-event-card .event-card-section .event-order-tab-panel .order-table-row.payments-grid.cols-5,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid.cols-5 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr) minmax(0, 0.9fr) minmax(0, 2.25fr) 44px;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid.cols-5,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid.cols-5 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr) minmax(0, 0.9fr) minmax(0, 2fr) minmax(132px, 0.9fr);
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-head.payments-grid.cols-6,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid.cols-6,
#screen-event-card .event-card-section .event-order-tab-panel .order-table-row.payments-grid.cols-6,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid.cols-6 {
    grid-template-columns: 1.4fr 1fr repeat(3, 1fr) 80px;
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-head.payments-grid.cols-7,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid.cols-7,
#screen-event-card .event-card-section .event-order-tab-panel .order-table-row.payments-grid.cols-7,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid.cols-7 {
    grid-template-columns: 1.4fr 1fr repeat(4, 1fr) 80px;
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-head.payments-grid.cols-8,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid.cols-8,
#screen-event-card .event-card-section .event-order-tab-panel .order-table-row.payments-grid.cols-8,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid.cols-8 {
    grid-template-columns: 1.4fr 1fr repeat(5, 1fr) 80px;
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-head.payments-grid.cols-9,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid.cols-9,
#screen-event-card .event-card-section .event-order-tab-panel .order-table-row.payments-grid.cols-9,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid.cols-9 {
    grid-template-columns: 1.4fr 1fr repeat(6, 1fr) 80px;
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-head.payments-grid.cols-10,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid.cols-10,
#screen-event-card .event-card-section .event-order-tab-panel .order-table-row.payments-grid.cols-10,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid.cols-10 {
    grid-template-columns: 1.4fr 1fr repeat(7, 1fr) 80px;
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-head.payments-grid.cols-11,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid.cols-11,
#screen-event-card .event-card-section .event-order-tab-panel .order-table-row.payments-grid.cols-11,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid.cols-11 {
    grid-template-columns: 1.4fr 1fr repeat(8, 1fr) 80px;
}

#screen-event-card .event-card-section .event-order-tab-panel .order-table-head.payments-grid.cols-12,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-head.payments-grid.cols-12,
#screen-event-card .event-card-section .event-order-tab-panel .order-table-row.payments-grid.cols-12,
#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid.cols-12 {
    grid-template-columns: 1.4fr 1fr repeat(9, 1fr) 80px;
}

/* Order / Payments: delete icon button – small red-tinted square */
#screen-event-card .order-table-row .phone-delete {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    background: #fff0f0;
    border: 1px solid #ffd4d4;
    color: #d44;
    border-radius: 6px;
}

#screen-event-card .order-table-row .phone-delete svg {
    stroke: #d44;
}

#screen-event-card .order-table-row .phone-delete:hover {
    background: #d44;
    border-color: #d44;
    color: #fff;
}

#screen-event-card .order-table-row .phone-delete:hover svg {
    stroke: #fff;
}

#screen-event-card .event-card-section .event-payments-tab-panel .event-payment-meta-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

#screen-event-card .event-card-section .event-payments-tab-panel .event-payment-meta-pair {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-table-row.payments-grid > .order-table-cell:nth-child(4) .event-payment-meta-pair {
    width: 100%;
}

#screen-event-card .event-card-section .event-payments-tab-panel .event-payment-meta-empty {
    color: var(--text2);
    font-size: 13px;
    padding-top: 8px;
}

#screen-event-card .event-card-section .event-payments-tab-panel .event-payments-save-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
}

#screen-event-card .event-card-section .event-payments-tab-panel .event-payments-save-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#screen-event-card .event-card-section .event-payments-tab-panel .event-payments-save-note,
#screen-event-card .event-card-section .event-payments-tab-panel .event-payments-save-status {
    margin: 0;
    line-height: 1.4;
}

#screen-event-card .event-card-section .event-payments-tab-panel .event-payments-save-note {
    color: var(--text2);
}

#screen-event-card .event-card-section .event-payments-tab-panel .event-payments-save-status {
    color: var(--text1);
    min-height: 1.4em;
}

#screen-event-card .event-card-section .event-payments-tab-panel .event-payments-save-btn {
    min-width: 148px;
    white-space: nowrap;
    flex: 0 0 auto;
}

#screen-event-card .event-card-section .event-payments-tab-panel .order-payment-note {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text2);
    font-size: 13px;
    max-width: 70%;
    margin-inline: auto;
    text-align: center;
}

#screen-event-card .event-payments-tab-panel .order-section-card textarea.input,
#screen-event-card .event-order-tab-panel .order-section-card textarea.input {
    border-radius: 12px;
}

/* ===== Event Card: full-screen refresh (system-aligned, scoped) ===== */

/* Desktop editor: center the editor like the rest of the system modals */
@media (min-width: 901px) {
    @keyframes ecEventCardScaleIn {
        0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0; }
        100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    }

    @keyframes ecEventCardScaleOut {
        0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
        100% { transform: translate(-50%, -50%) scale(0.92); opacity: 0; }
    }

    #screen-event-card .event-editor-container {
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        transform: translateY(100%);
        opacity: 1;
        will-change: transform;
        transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
        background: var(--bg-app);
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    #screen-event-card .event-editor-container.is-open {
        transform: translateY(0);
        animation: none;
    }

    #screen-event-card .event-editor-container.is-open.closing {
        transform: translateY(100%);
    }

    /* Keep the fixed actions bar aligned with the centered modal */
    #screen-event-card .event-editor-container.is-open .event-editor > .editor-actions {
        width: 100%;
        left: 0;
        transform: none;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    /* Ensure content doesn't sit under the fixed actions bar */
    #screen-event-card .event-editor-container.is-open {
        padding-bottom: calc(4rem + 110px);
    }
}

/* Desktop header: lighter, premium sticky bar */
@media (min-width: 768px) {
    #screen-event-card .event-desktop-header {
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border-soft);
        padding: 18px 22px;
        z-index: 12;
    }

    #screen-event-card .event-desktop-title {
        font-size: 22px;
    }

    #screen-event-card .event-desktop-meta {
        font-size: 13px;
    }
}

/* Desktop layout: consistent gutters + better responsiveness */
@media (min-width: 768px) {
    #screen-event-card .event-editor-desktop-wrapper {
        padding: 18px 22px 22px;
        gap: 14px;
        align-items: start;
        grid-template-columns: minmax(0, 1fr) calc((100% - 42px) / 4);
    }

    #screen-event-card .event-editor-desktop-wrapper:has(.diary-module.meeting-three-col) {
        grid-template-columns: minmax(0, 1fr) calc((100% - 42px) / 4);
        gap: 14px;
        padding: 18px 22px 22px;
    }

    @media (max-width: 1100px) {
        #screen-event-card .event-editor-desktop-wrapper {
            grid-template-columns: 1fr;
        }
    }

    #screen-event-card .event-editor-side-column {
        align-self: start;
    }
}

/* Financial widgets: tighter + more consistent with cards */
@media (min-width: 768px) {
    #screen-event-card .event-financial-row {
        padding: 18px 22px 0;
        gap: 14px;
        box-sizing: border-box;
    }

    #screen-event-card .diary-module.event-three-col .diary-form select.diary-schedule-type-select,
    #screen-event-card .diary-module.event-three-col .diary-form select.diary-schedule-type-select:focus {
        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;
    }

    #screen-event-card .diary-module.event-three-col .diary-form .tw-date-picker.diary-reserved-until-picker {
        position: relative;
    }

    #screen-event-card .diary-module.event-three-col .diary-form .tw-date-picker.diary-reserved-until-picker .diary-reserved-until-floating-title {
        position: absolute;
        top: 0;
        right: 12px;
        transform: translateY(-50%);
        z-index: 2;
        background: var(--white);
        padding: 0 6px;
        margin: 0;
        font-size: 12px;
        font-weight: 600;
        color: var(--text2);
        line-height: 1.2;
        display: inline-block;
        pointer-events: none;
    }

    #screen-event-card .diary-module.event-three-col .diary-form .tw-time-input-wrapper.diary-schedule-start-time-picker,
    #screen-event-card .diary-module.event-three-col .diary-form .tw-time-input-wrapper.diary-schedule-end-time-picker {
        position: relative;
    }

    #screen-event-card .diary-module.event-three-col .diary-form .tw-time-input-wrapper .diary-time-floating-title {
        position: absolute;
        top: 0;
        right: 12px;
        transform: translateY(-50%);
        z-index: 2;
        background: var(--white);
        padding: 0 6px;
        margin: 0;
        font-size: 12px;
        font-weight: 600;
        color: var(--text2);
        line-height: 1.2;
        display: inline-block;
        pointer-events: none;
    }

    @media (max-width: 1100px) {
        #screen-event-card .event-financial-row {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    #screen-event-card .event-fin-widget {
        border: 1px solid var(--border-soft);
        border-radius: 14px;
        padding: 14px;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    }

    #screen-event-card .event-fin-label {
        letter-spacing: 0.2px;
    }
}

/* Timeline side card: restore as a real card (it currently gets flattened) */
@media (min-width: 768px) {
    .event-menu-source-body .event-menu-dish-row.is-selected .event-menu-dish-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .event-menu-source-body .event-menu-dish-row.is-selected .event-menu-dish-title::after {
        content: '✓';
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #2e7d32;
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        flex: 0 0 auto;
    }

    #screen-event-card .event-card-section.event-timeline-card {
        background: var(--white);
        border: 0;
        border-radius: 16px;
        box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
        padding: 16px;
    }

    #screen-event-card .event-timeline {
        gap: 28px;
        padding-bottom: 18px;
    }

    #screen-event-card .event-tl-content {
        border-radius: 16px 7px 16px 5px;
    }


}

/* ===== Contract text: reduce font-size even for pasted / template content ===== */
#screen-event-card .richtext-editor {
    font-size: 13px;
    line-height: 1.6;
}
#screen-event-card .richtext-editor font,
#screen-event-card .richtext-editor span,
#screen-event-card .richtext-editor p,
#screen-event-card .richtext-editor div,
#screen-event-card .richtext-editor h1,
#screen-event-card .richtext-editor h2,
#screen-event-card .richtext-editor h3,
#screen-event-card .richtext-editor h4 {
    font-size: inherit !important;
}


/* Mobile save FAB: hidden by default (shown only in mobile media query) */
#screen-event-card .meeting-modal-save-footer {
    display: none;
}

/* =====================================================================
   EVENT CARD – COMPREHENSIVE MOBILE OVERHAUL (≤767px)
   Mobile-only. Does NOT change desktop styling.
   ===================================================================== */
@media (max-width: 767px) {

    /* Hide tabs that are not relevant on mobile (visual only — logic untouched) */
    #screen-event-card .form-tab-btn[data-ec-tab="payments"],
    #screen-event-card .form-tab-btn[data-ec-tab="staffing"],
    #screen-event-card .form-tab-btn[data-ec-tab="suppliers"] {
        display: none !important;
    }

    /* ── Container & overlay ── */
    #screen-event-card .event-editor-container {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: none !important;
        border-radius: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        transform: translateY(100%) !important;
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1) !important;
    }

    #screen-event-card .event-editor-container.is-open {
        transform: translateY(0) !important;
        animation: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        padding-bottom: calc(112px + env(safe-area-inset-bottom)) !important;
    }

    /* ── Menu tab (mobile): stack source on top, selected below ── */
    #screen-event-card .event-menu-tab-panel > .content-scroll {
        padding: 0 !important;
    }

    #screen-event-card .event-menu-top-actions-outside,
    #screen-event-card .event-menu-panel-header .event-menu-clear-btn,
    #screen-event-card .event-menu-panel-right > .event-menu-panel-header {
        display: none !important;
    }

    #screen-event-card .event-menu-mobile-picker {
        display: block !important;
        width: 100%;
        margin: 0 0 8px 0;
        border: 0 !important;
        background-color: var(--lightgray) !important;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%23333' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
        background-repeat: no-repeat !important;
        background-position: left 12px center !important;
        background-size: 12px 8px !important;
        padding-inline-start: 32px !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
    }
    #screen-event-card .event-menu-mobile-picker:focus,
    #screen-event-card .event-menu-mobile-picker:active {
        background-color: var(--lightgray) !important;
        color: inherit !important;
        outline: none !important;
        border: 0 !important;
    }

    #screen-event-card .event-menu-board {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding: 12px !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        width: 96% !important;
        margin-inline: auto !important;
    }

    #screen-event-card .event-menu-panel {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        border-radius: 12px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    #screen-event-card .event-menu-panel-right {
        height: auto !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    #screen-event-card .event-menu-panel-header {
        position: sticky;
        top: 0;
        z-index: 1;
        background: var(--white);
        flex: 0 0 auto;
        border-bottom: 0 !important;
        padding-inline: 0 !important;
    }

    #screen-event-card .event-menu-panel-right .event-menu-panel-body {
        flex: 1 1 auto !important;
        max-height: none !important;
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch;
        background: transparent !important;
        padding: 0 !important;
        scrollbar-width: thin;
        scrollbar-color: var(--primary, #999) transparent;
    }

    #screen-event-card .event-menu-panel-right .event-menu-panel-body::-webkit-scrollbar {
        width: 6px;
        -webkit-appearance: none;
        background: transparent;
    }

    #screen-event-card .event-menu-panel-right .event-menu-panel-body::-webkit-scrollbar-thumb {
        background: var(--primary, #999);
        border-radius: 4px;
        min-height: 40px;
        -webkit-box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
    }

    #screen-event-card .event-menu-panel-right .event-menu-panel-body::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.04);
        border-radius: 4px;
    }

    #screen-event-card .event-menu-panel-left {
        display: none !important;
    }

    #screen-event-card .event-menu-panel-left .event-menu-empty {
        border: 0 !important;
        background: var(--bg-app) !important;
    }

    #screen-event-card .event-menu-dish-row,
    #screen-event-card .event-menu-dish-row:hover,
    #screen-event-card .event-menu-dish-row:active,
    #screen-event-card .event-menu-dish-row:focus,
    #screen-event-card .event-menu-dish-row:focus-within,
    #screen-event-card .event-menu-dish-row.is-selected,
    #screen-event-card .event-menu-dish-row.is-selected:hover,
    #screen-event-card .event-menu-dish-row.is-selected:active,
    #screen-event-card .event-menu-dish-row.is-selected:focus,
    #screen-event-card .event-menu-dish-row.is-selected:focus-within,
    #screen-event-card .event-menu-dish-row.is-note-open,
    #screen-event-card .event-menu-dish-row.dragging {
        background: var(--bg-app) !important;
        background-color: var(--bg-app) !important;
        border-color: transparent !important;
        opacity: 1 !important;
        filter: none !important;
        -webkit-tap-highlight-color: transparent !important;
        transition: none !important;
    }
    #screen-event-card .event-menu-dish-row.is-selected,
    #screen-event-card .event-menu-dish-row.is-selected:hover {
        background: var(--bg-app) !important;
        border-color: transparent !important;
    }

    #screen-event-card .event-menu-dish-row {
        cursor: pointer;
        border: 0 !important;
        box-shadow: none !important;
        position: relative;
        padding-inline-start: 41px !important;
        transition: none !important;
        margin-bottom: 14px !important;
    }

    #screen-event-card .event-menu-mobile-drag-handle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 6px;
        inset-inline-start: 8px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: var(--white);
        color: var(--text1);
        font-size: 18px;
        font-weight: 600;
        line-height: 1;
        cursor: grab;
        touch-action: none;
        user-select: none;
        box-shadow: 0 1px 2px rgba(0,0,0,0.08);
        -webkit-tap-highlight-color: transparent;
    }

    #screen-event-card .event-menu-dish-row.is-selected .event-menu-mobile-drag-handle,
    #screen-event-card .event-menu-dish-row.is-note-open .event-menu-mobile-drag-handle {
        display: none;
    }

    #screen-event-card .event-menu-dish-row.is-selected {
        padding-inline-start: 41px !important;
    }

    #screen-event-card .event-menu-source-body .event-menu-dish-note-trigger {
        margin-top: 5px;
    }

    #screen-event-card .event-menu-source-body .event-menu-dish-desc,
    #screen-event-card .event-menu-source-body .event-menu-dish-notes {
        display: none !important;
    }

    #screen-event-card .event-menu-source-body .event-menu-category-img,
    #screen-event-card .event-menu-source-body .event-menu-category-notes {
        display: none !important;
    }

    #screen-event-card .event-menu-selected-body .event-menu-selected-category-img,
    #screen-event-card .event-menu-selected-body .event-menu-selected-category-notes,
    #screen-event-card .event-menu-selected-body .event-menu-selected-dish-desc {
        display: none !important;
    }

    #screen-event-card .event-menu-selected-body .event-menu-selected-dish-notes {
        display: block !important;
        margin-top: 3px !important;
        white-space: normal !important;
    }

    #screen-event-card .event-menu-selected-body .event-menu-selected-category-title {
        color: var(--text1) !important;
    }

    #screen-event-card .event-menu-selected-body .event-menu-selected-category {
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin-bottom: 18px !important;
    }

    #screen-event-card .event-menu-selected-body .event-menu-selected-category-header {
        border: 0 !important;
        background: transparent !important;
        padding: 8px 0 !important;
    }

    #screen-event-card .event-menu-selected-dish-row {
        background: var(--bg-app) !important;
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 12px !important;
        padding: 10px !important;
        margin-top: 0 !important;
        margin-bottom: 8px !important;
        align-items: flex-start !important;
        min-height: 0 !important;
        height: auto !important;
    }

    #screen-event-card .event-menu-selected-remove {
        background: transparent !important;
        border: 0 !important;
        width: auto !important;
        min-width: 0 !important;
        height: auto !important;
        padding: 0 !important;
    }

    #screen-event-card:has(.event-menu-tab-panel.active) ~ * button.mobile-scroll-top-btn,
    body:has(#screen-event-card .event-menu-tab-panel.active) button.mobile-scroll-top-btn {
        display: none !important;
    }

    #screen-event-card .event-menu-dish-row.is-selected,
    #screen-event-card .event-menu-dish-row.is-selected:hover,
    #screen-event-card .event-menu-dish-row.is-selected:active,
    #screen-event-card .event-menu-dish-row.is-selected:focus,
    #screen-event-card .event-menu-dish-row.is-selected:focus-within {
        background: var(--bg-app) !important;
        opacity: 1 !important;
        filter: none !important;
        -webkit-tap-highlight-color: transparent !important;
        transition: none !important;
    }

    #screen-event-card .event-menu-dish-row.is-selected .event-menu-dish-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    #screen-event-card .event-menu-dish-row.is-selected .event-menu-dish-title::after {
        content: '✓';
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #2e7d32;
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        flex: 0 0 auto;
    }

    #screen-event-card .event-menu-dish-row.is-selected .event-menu-mobile-remove-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 6px;
        inset-inline-start: 8px;
        width: 24px;
        height: 24px;
        border: 0;
        border-radius: 50%;
        background: var(--white);
        color: var(--text1);
        font-size: 18px;
        font-weight: 600;
        line-height: 1;
        padding: 0;
        cursor: pointer;
        box-shadow: 0 1px 2px rgba(0,0,0,0.08);
        z-index: 5;
        pointer-events: auto;
    }

    #screen-event-card .event-menu-dish-note-popover {
        width: calc(100% + 41px) !important;
        margin-inline-start: -41px !important;
        box-sizing: border-box !important;
        padding-right: 5px !important;
    }

    #screen-event-card .event-menu-dish-note-footer .event-menu-dish-note-action:last-child {
        min-height: 26px !important;
        height: 30px !important;
        padding: 3px 22px !important;
        border-radius: 999px !important;
        width: 50px !important;
    }

    #screen-event-card .event-menu-dish-note-footer .event-menu-dish-note-action:first-child {
        min-height: 26px !important;
        height: 30px !important;
        padding: 3px 12px !important;
        background: var(--primary) !important;
        color: var(--white) !important;
        border-color: var(--primary) !important;
    }

    #screen-event-card .event-menu-dish-note-preset {
        min-height: 20px !important;
        padding: 1px 9px !important;
    }

    #screen-event-card .event-menu-touch-ghost {
        box-shadow: 0 4px 12px rgba(0,0,0,0.18) !important;
        border-radius: 12px !important;
        transform: scale(1.02);
    }

    #screen-event-card .event-menu-mobile-fab-wrap {
        display: flex !important;
        gap: 10px;
        margin: 16px auto 24px;
        padding: 0 12px;
        width: 96%;
    }

    #screen-event-card .event-menu-mobile-fixed-notes-field {
        display: block;
        width: 96%;
        margin: 16px auto 0;
        padding: 0;
        background: transparent;
    }

    #screen-event-card .event-menu-mobile-fixed-notes-block {
        border: 1px solid var(--border-soft);
        border-radius: 14px;
        border-top-width: 1px;
    }

    #screen-event-card .event-menu-mobile-fab-btn {
        flex: 1 1 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 50px;
        padding: 14px 12px;
        border: 0;
        border-radius: 999px;
        background: var(--primary);
        color: var(--white);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    }

    #screen-event-card .event-menu-mobile-fab-btn svg {
        flex: 0 0 auto;
    }

    #screen-event-card .event-menu-selected-body.drag-over {
        background: var(--bg-app) !important;
        outline: 2px dashed var(--primary);
        outline-offset: -4px;
    }

    #screen-event-card .event-menu-category-card {
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        margin-bottom: 0 !important;
    }

    #screen-event-card .event-menu-category-header {
        border-bottom: 0 !important;
    }

    #screen-event-card .event-menu-dish-list {
        padding: 0 !important;
    }

    #screen-event-card .event-card-forms-layout {
        flex-direction: column;
        gap: 12px;
    }

    #screen-event-card .event-card-forms-layout > .event-card-forms-section,
    #screen-event-card .event-card-forms-layout > .event-card-forms-section:first-child,
    #screen-event-card .event-card-forms-layout > .event-card-forms-section:last-child {
        flex: 1 1 100%;
        width: 100%;
    }

    #screen-event-card .event-card-forms-create-section {
        order: -1;
    }

    #screen-event-card .event-card-forms-create-section .order-section-card {
        margin-top: 0;
        min-height: auto;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    #screen-event-card .event-card-forms-layout > .event-card-forms-section:first-child .order-section-card {
        border: 0;
        background: transparent;
        box-shadow: none;
        padding: 0;
        min-height: 0;
    }

    #screen-event-card .event-card-forms-create-placeholder {
        min-height: 52px;
        padding: 0 16px;
        border: 0;
        border-radius: 12px;
        background: var(--lightblue2);
        font-size: 16px;
        font-weight: 600;
    }

    #screen-event-card .event-card-forms-create-placeholder-icon {
        font-size: 24px;
    }

    #screen-event-card .event-card-forms-create-placeholder-label {
        font-size: 16px;
    }

    #screen-event-card .event-card-forms-table-wrap {
        overflow: visible;
    }

    #screen-event-card .event-card-forms-table {
        min-width: 0;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

    #screen-event-card .event-card-forms-table,
    #screen-event-card .event-card-forms-table thead,
    #screen-event-card .event-card-forms-table tbody,
    #screen-event-card .event-card-forms-table th {
        display: block;
        width: 100%;
    }

    #screen-event-card .event-card-forms-table thead {
        display: none;
    }

    #screen-event-card .event-card-forms-table tbody {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    #screen-event-card .event-card-forms-table tbody tr {
        position: relative;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "type    status"
            "created signed"
            "actions actions";
        column-gap: 12px;
        row-gap: 10px;
        width: 100%;
        padding: 14px 18px 14px 14px;
        background: var(--bg-app);
        border: 0;
        border-radius: 18px;
        box-shadow: none;
        overflow: hidden;
    }

    #screen-event-card .event-card-forms-table tbody tr::before {
        content: none;
    }

    #screen-event-card .event-card-forms-table td {
        display: block;
        padding: 0;
        margin: 0;
        border: 0;
        background: transparent;
        text-align: right;
        font-size: 13px;
        min-width: 0;
    }

    #screen-event-card .event-card-forms-table td::before {
        content: none;
    }

    #screen-event-card .event-card-forms-table td[data-label="סוג"] {
        grid-area: type;
        align-self: center;
    }

    #screen-event-card .event-card-forms-table td[data-label="סטטוס"] {
        grid-area: status;
        justify-self: end;
        align-self: center;
    }

    #screen-event-card .event-card-forms-table td[data-label="מועד יצירה"] {
        grid-area: created;
        align-self: center;
    }

    #screen-event-card .event-card-forms-table td[data-label="מועד חתימה"] {
        grid-area: signed;
        justify-self: end;
        align-self: center;
        text-align: left;
    }

    #screen-event-card .event-card-forms-table td[data-label="צפייה"],
    #screen-event-card .event-card-forms-table td[data-label="הורדה"],
    #screen-event-card .event-card-forms-table td[data-label="קישור"] {
        grid-area: actions;
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        width: auto;
        padding-top: 10px;
        margin-top: 2px;
        border-top: 0;
    }

    #screen-event-card .event-card-forms-table td[data-label="צפייה"] {
        justify-self: start;
    }

    #screen-event-card .event-card-forms-table td[data-label="הורדה"] {
        justify-self: center;
    }

    #screen-event-card .event-card-forms-table td[data-label="קישור"] {
        justify-self: end;
    }

    #screen-event-card .event-card-forms-type-label {
        font-size: 15px;
        font-weight: 700;
        color: var(--text);
        line-height: 1.25;
        letter-spacing: -0.1px;
    }

    #screen-event-card .event-card-forms-type-meta {
        margin-top: 4px;
        padding: 0;
        font-size: 11.5px;
        color: var(--text2);
    }

    #screen-event-card .event-card-forms-datetime-cell {
        display: flex;
        flex-direction: column;
        gap: 1px;
        font-size: 12px;
        color: var(--text2);
        line-height: 1.3;
    }

    #screen-event-card .event-card-forms-datetime-date {
        font-size: 12.5px;
        font-weight: 600;
        color: var(--text);
    }

    #screen-event-card .event-card-forms-datetime-time {
        margin-top: 0;
        font-size: 11.5px;
        color: var(--text2);
    }

    #screen-event-card .event-card-forms-status {
        min-width: 0;
        padding: 5px 12px;
        font-size: 11.5px;
        font-weight: 700;
        letter-spacing: 0.1px;
        background: var(--white);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    }

    #screen-event-card .event-card-forms-view-link,
    #screen-event-card .event-card-forms-download-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        min-height: 38px;
        max-height: 38px;
        padding: 0;
        background: var(--white);
        border: 1px solid var(--primary-2);
        border-radius: 12px;
        color: var(--primary);
        box-shadow: 0 2px 6px -2px rgba(25, 84, 141, 0.25);
    }

    #screen-event-card .event-card-forms-view-link svg,
    #screen-event-card .event-card-forms-download-link svg {
        width: 18px;
        height: 18px;
    }

    #screen-event-card .event-card-forms-table td[data-label="קישור"] a {
        display: inline-flex;
        align-items: center;
        padding: 8px 14px;
        background: var(--primary);
        color: var(--white);
        border-radius: 999px;
        font-size: 12.5px;
        font-weight: 700;
        box-shadow: 0 2px 8px -2px rgba(25, 84, 141, 0.4);
    }

    #screen-event-card .event-editor-container.is-open.closing {
        transform: translateY(100%) !important;
    }

    .event-card-overlay-close {
        display: none !important;
    }

    /* ── Mobile header (sticky top bar) ── */
    .event-mobile-header {
        position: relative !important;
        top: auto;
        left: auto;
        right: auto;
        min-height: 65px;
        max-height: 65px;
        padding: 0 16px !important;
        padding-top: max(0px, env(safe-area-inset-top)) !important;
        z-index: 2;
        width: 100%;
        margin-bottom: 8px;
        background: var(--primary);
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    }

    .event-mobile-header h1.event-mobile-title-details {
        margin: 0;
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        text-align: right;
        direction: rtl;
        line-height: 1.1;
        overflow: hidden;
        transform: translateY(2px);
    }

    .event-mobile-header h1 .event-mobile-title-owner {
        display: block;
        width: 100%;
        text-align: right;
        font-size: 16px;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .event-mobile-header h1.event-mobile-title-details > div {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 6px;
        gap: 8px;
    }

    .event-mobile-header h1 .event-mobile-title-meta {
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
        text-align: right;
        font-size: 13px;
        font-weight: 400;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        opacity: 0.92;
    }

    .event-mobile-header h1 .event-mobile-title-meta .event-mobile-title-meta-group {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        min-width: 0;
        white-space: nowrap;
    }

    .event-mobile-header h1 .event-mobile-title-meta .event-mobile-title-meta-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        opacity: 0.9;
        flex-shrink: 0;
    }

    .event-mobile-header h1 .event-mobile-title-meta .event-mobile-title-meta-icon svg {
        width: 14px;
        height: 14px;
        fill: none !important;
        stroke: currentColor;
    }

    .event-mobile-header h1.event-mobile-title-details > div .event-status-badge {
        font-size: 11px;
        line-height: 1;
        padding: 5px 6px;
        border-radius: 6px;
        border: 0;
        font-weight: 400;
        white-space: nowrap;
        margin-right: 4px;
    }

    .event-mobile-close-btn {
        order: 2;
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        margin-inline-start: 12px;
        margin-inline-end: 0;
        color: var(--white);
        opacity: 0.85;
        border: 0;
        background: transparent;
    }

    .event-mobile-close-btn svg {
        width: 26px;
        height: 26px;
        stroke: currentColor;
    }

    /* ── Hide desktop-only elements ── */
    .event-editor .editor-topbar,
    .event-desktop-header,
    .event-editor-desktop-wrapper .event-editor-side-column,
    .event-financial-row,
    .event-card-overlay-close,
    .event-quick-note-fab-wrap {
        display: none !important;
    }

    /* ── Desktop wrapper → single column ── */
    .event-editor-desktop-wrapper {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        gap: 0 !important;
    }

    .event-editor-main-column {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
    }

    #screen-event-card .event-editor {
        background: var(--bg-mobile) !important;
    }

    /* ── Card section (tab host) ── */
    #screen-event-card .event-card-section {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: 0 !important;
        background: var(--bg-mobile) !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        max-height: none !important;
        overflow: visible !important;
    }

    #screen-event-card .form-tabs-wrapper {
        width: 100% !important;
        min-height: 100dvh !important;
        height: auto !important;
        max-height: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: var(--bg-mobile) !important;
        overflow: visible !important;
    }

    #screen-event-card .form-tabs-content {
        background: var(--white) !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        margin-top: 0 !important;
    }

    /* ══════════════════════════════════════════════════════
       TABS – clean horizontal strip, scrollable
       ══════════════════════════════════════════════════════ */
    #screen-event-card .event-editor .form-tabs-nav,
    .event-desktop-tabs-container {
        display: flex !important;
        overflow-x: auto !important;
        overflow-y: hidden;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px !important;
        padding: 0 16px 8px !important;
        margin: 20px 0 0 !important;
        background: transparent !important;
        border-bottom: 0 !important;
        position: static !important;
        top: auto;
        z-index: auto;
    }

    #screen-event-card .event-editor .form-tabs-nav::-webkit-scrollbar,
    .event-desktop-tabs-container::-webkit-scrollbar {
        display: none;
    }

    #screen-event-card .event-editor .form-tabs-nav > .form-tab-btn,
    .event-desktop-tab-item {
        padding: 8px 20px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
        flex: 0 0 auto !important;
        flex-shrink: 0;
        width: auto !important;
        border: 0 !important;
        background: var(--white) !important;
        color: var(--text1) !important;
        border-radius: 999px !important;
        min-width: 0;
        position: relative;
        transition: color 0.2s, background-color 0.2s;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    }

    #screen-event-card .event-editor .form-tabs-nav > .form-tab-btn.tab-disabled,
    .event-desktop-tab-item.tab-disabled {
        opacity: 1;
        background: var(--white) !important;
        color: var(--text2) !important;
        pointer-events: none;
    }

    #screen-event-card .event-editor .form-tabs-nav > .form-tab-btn.active,
    .event-desktop-tab-item.active {
        color: var(--white) !important;
        font-weight: 700 !important;
        background: var(--primary) !important;
        border-color: var(--primary) !important;
    }

    #screen-event-card .event-editor .form-tabs-nav > .form-tab-btn.active::after,
    .event-desktop-tab-item.active::after {
        content: none;
    }

    #screen-event-card .event-editor .form-tabs-nav > .form-tab-btn::after {
        content: none !important;
        display: none !important;
    }

    #screen-event-card .event-editor .form-tabs-nav .event-schedule-tab-dot {
        display: none !important;
    }

    /* Tab dot (schedule/tasks indicator) */
    .event-schedule-tab-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        display: inline-block;
        margin-inline-start: 4px;
        vertical-align: middle;
    }

    .event-schedule-tab-dot.hidden {
        display: none;
    }

    /* ══════════════════════════════════════════════════════
       TAB PANELS & CONTENT AREA
       ══════════════════════════════════════════════════════ */
    .form-tab-panel {
        display: none;
    }

    .form-tab-panel.active {
        display: block;
    }

    #screen-event-card .form-tab-panel.active {
        min-height: 100vh !important;
        min-height: 100dvh !important;
        height: auto !important;
        max-height: none !important;
    }

    #screen-event-card .form-tab-panel.active > .content-scroll,
    #screen-event-card .form-tab-panel.active > .content-centered {
        min-height: 100vh !important;
        min-height: 100dvh !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    #screen-event-card .event-editor-container.is-open:has(.form-tabs-content > .form-tab-panel:first-child.active),
    #screen-event-card .event-editor-container.is-open:has(.form-tabs-content > .form-tab-panel:nth-child(2).active) {
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child.active > .content-centered,
    #screen-event-card .form-tabs-content > .form-tab-panel:first-child.active > .content-centered > .content-scroll,
    #screen-event-card .form-tabs-content > .form-tab-panel:nth-child(2).active > .content-scroll {
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    #screen-event-card .content-scroll {
        padding: 8px 16px 0 !important;
        margin-top: 30px;
    }

    #screen-event-card .content-centered {
        display: block !important;
    }

    #screen-event-card .form-container {
        max-width: 100% !important;
        gap: 14px !important;
    }

    #screen-event-card .form-container[data-ec-container="1"],
    #screen-event-card .form-container[data-ec-container="1"] .event-schedule-area,
    #screen-event-card .form-container[data-ec-container="1"] .diary-module.event-three-col,
    #screen-event-card .form-container[data-ec-container="1"] .diary-module.event-three-col .diary-form,
    #screen-event-card .form-container[data-ec-container="1"] .diary-module.event-three-col .meeting-calendar-col,
    #screen-event-card .form-container[data-ec-container="1"] .diary-module.event-three-col .diary-calendar-widget {
        background: var(--white) !important;
    }

    #screen-event-card .event-diary-form-title {
        display: none !important;
    }

    /* ══════════════════════════════════════════════════════
       FORM SECTIONS (cards within tab panels)
       ══════════════════════════════════════════════════════ */
    #screen-event-card .form-section {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 14px !important;
        border-radius: 10px !important;
        margin-bottom: 12px !important;
        background: var(--white) !important;
        border: 1px solid var(--border-soft) !important;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
    }

    #screen-event-card .form-container.event-basic-two-cols-host {
        background: var(--white) !important;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child {
        background: #f3f4f6 !important;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child > .content-centered > .content-scroll {
        padding-inline: 0 !important;
        padding-top: 0 !important;
    }

    #screen-event-card .event-order-tab-panel > .content-scroll {
        padding-inline: 0 !important;
        padding-top: 0 !important;
    }

    #screen-event-card .event-order-tab-panel .order-contract-grid {
        margin-top: 0 !important;
    }

    #screen-event-card .event-basic-two-cols .form-section {
        border: 0 !important;
    }

    /* Keep basic details card style aligned with the mobile shell */
    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .form-section {
        background: var(--white) !important;
        margin-top: 0 !important;
        border-radius: 0 !important;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .phones-editor .phone-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .field:has(.phones-editor) {
        grid-column: 1 / -1;
        width: 100% !important;
        max-width: none !important;
        justify-self: stretch !important;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .field:has(.phones-editor) > div,
    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .field:has(.phones-editor) .phones-editor,
    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .field:has(.phones-editor) .phones-list,
    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .field:has(.phones-editor) .phone-row {
        margin-top: 0 !important;
        width: 100% !important;
        max-width: none !important;
        justify-self: stretch !important;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .phones-editor .phone-row > .phone-col,
    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .phones-editor .phone-row > .phone-col .input,
    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .phones-editor .phone-row > .phone-col input,
    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .phones-editor .phone-row > .phone-col .phone-side,
    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .phones-editor .phone-row > .phone-col .autocomplete-wrapper {
        display: block;
        flex: 0 0 auto;
        width: 100% !important;
        max-width: 100% !important;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .phones-editor .phone-row > .phone-actions {
        width: 42px;
        min-width: 42px;
        align-self: flex-start;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:nth-child(2) .form-section {
        background: var(--white) !important;
        border: 1px solid var(--border-soft) !important;
        margin-top: 0 !important;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child .input,
    #screen-event-card .form-tabs-content > .form-tab-panel:first-child input,
    #screen-event-card .form-tabs-content > .form-tab-panel:first-child select {
        background-color: #f8fafc !important;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child 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='%230f172a' 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 12px center;
        background-size: 16px;
        padding-left: 36px !important;
    }

    #screen-event-card .diary-module.event-three-col .diary-form .input,
    #screen-event-card .diary-module.event-three-col .diary-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    #screen-event-card .diary-module.event-three-col .diary-form select,
    #screen-event-card .diary-module.event-three-col .diary-form .tw-time-input {
        background-color: #f8fafc !important;
    }

    #screen-event-card .section-title {
        font-size: 14px !important;
        font-weight: 700 !important;
        margin: 0 0 10px !important;
        padding-bottom: 8px;
        border-bottom: 0 !important;
        color: var(--primary) !important;
    }

    .event-card-section-title {
        font-size: 14px !important;
        font-weight: 600 !important;
        margin-bottom: 0 !important;
    }

    /* ══════════════════════════════════════════════════════
       FIELDS – consistent single-column layout
       ══════════════════════════════════════════════════════ */
    #screen-event-card .form-section .field {
        margin: 0 !important;
    }

    #screen-event-card .form-section .field.col-2,
    #screen-event-card .form-section .field.col-1-3 {
        grid-column: 1 / -1;
        max-width: 100% !important;
    }

    .fields-row-3 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Labels */
    #screen-event-card .form-section .label,
    #screen-event-card .form-section label.label {
        font-size: 12px !important;
        font-weight: 600 !important;
        padding-right: 13px !important;
        margin-bottom: 3px !important;
        color: var(--text2) !important;
    }

    /* Inputs, selects, textareas */
    #screen-event-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    #screen-event-card .input:not(textarea),
    #screen-event-card select {
        height: 42px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
        padding: 0 12px !important;
    }

    #screen-event-card textarea {
        font-size: 14px !important;
        border-radius: 10px !important;
        min-height: 70px;
        padding: 10px 12px !important;
    }

    /* Prevent iOS zoom on focus */
    #screen-event-card input,
    #screen-event-card select,
    #screen-event-card textarea {
        font-size: 14px !important;
    }

    #screen-event-card input::placeholder,
    #screen-event-card textarea::placeholder,
    #screen-event-card .input::placeholder {
        font-size: 14px !important;
    }

    /* ══════════════════════════════════════════════════════
       PHONES EDITOR – stacked rows, each row is 2 cols
       ══════════════════════════════════════════════════════ */
    #screen-event-card .form-section .field:has(.phones-editor),
    #screen-event-card .form-section .field:has(.phones-editor) > div:not(.field-error) {
        margin-top: 0 !important;
    }

    #screen-event-card .form-section .phones-editor .phone-row {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 20px !important;
        align-items: start !important;
        background: var(--white) !important;
        box-sizing: border-box !important;
        position: relative !important;
    }

    #screen-event-card .form-section .phones-editor .phone-row:not(:last-child) {
        padding-bottom: 10px !important;
        border-bottom: 1px solid var(--border-soft) !important;
        margin-bottom: 10px !important;
    }

    #screen-event-card .form-section .phones-editor .phone-col {
        width: 100%;
        gap: 3px !important;
    }

    #screen-event-card .form-section .phones-editor .phone-col-label {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: var(--text2) !important;
        margin-bottom: 0 !important;
    }

    #screen-event-card .form-section .phones-editor .phone-col .input,
    #screen-event-card .form-section .phones-editor .phone-col input[type="text"],
    #screen-event-card .form-section .phones-editor .phone-col input[type="tel"] {
        height: 42px !important;
        max-height: 42px !important;
        flex: 0 0 42px !important;
    }

    #screen-event-card .form-section .phones-editor .phone-actions {
        height: 42px;
        justify-content: center;
        display: flex;
        width: 42px;
        position: absolute;
        left: 0;
        bottom: 0;
        transform: translateX(calc(-100% - 18px));
    }

    #screen-event-card .diary-module.event-three-col .diary-form .tw-time-input,
    #screen-event-card .diary-module.event-three-col .diary-form .tw-time-input-wrapper input {
        height: 42px !important;
        min-height: 42px !important;
    }

    #screen-event-card .diary-module.event-three-col .diary-form .tw-dp-trigger,
    #screen-event-card .diary-module.event-three-col .diary-form select,
    #screen-event-card .diary-module.event-three-col .diary-form select.input {
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
    }

    #screen-event-card .diary-module.event-three-col .diary-form select,
    #screen-event-card .diary-module.event-three-col .diary-form select.input {
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%230f172a' 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 12px center;
        background-size: 16px;
        padding-left: 36px !important;
    }

    #screen-event-card .diary-module.event-three-col .diary-form .tw-dp-trigger {
        background: var(--bg-app) !important;
    }

    #screen-event-card .order-vat-label,
    #screen-event-card .tw-dp-icon,
    #screen-event-card .tw-time-icon {
        display: none !important;
    }

    /* Autocomplete dropdown */
    #screen-event-card .autocomplete-list {
        position: fixed !important;
        top: auto !important;
        bottom: 0;
        left: 0 !important;
        right: 0 !important;
        max-height: 50vh;
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -8px 30px rgba(0,0,0,0.12);
        z-index: 10000 !important;
    }

    /* ══════════════════════════════════════════════════════
       FIELD CARDS (basic details tab inner wrappers)
       ══════════════════════════════════════════════════════ */
    .event-editor .form-grid .form-tab-panel .field > div:not(.field-error) {
        border-radius: 12px !important;
        padding: 12px !important;
        gap: 0 !important;
    }

    /* Mobile: match background for Event Type + Guests Count rows */
    #screen-event-card .form-section .field > div:not(.field-error):has(> label.label + select.input),
    #screen-event-card .form-section .field > div:not(.field-error):has(> label.label + input.input[placeholder*="מוזמנים"]) {
        background: var(--white) !important;
    }

    #screen-event-card .form-section .field > div:not(.field-error):has(> label.label + .tw-date-picker),
    #screen-event-card .form-section .field > div:not(.field-error):has(> label.label + div .tw-date-picker) {
        background: var(--bg-app) !important;
    }

    #screen-event-card .form-section .field > div:not(.field-error):has(> label.label + .tw-date-picker) .tw-dp-trigger,
    #screen-event-card .form-section .field > div:not(.field-error):has(> label.label + div .tw-date-picker) .tw-dp-trigger {
        background: var(--bg-app) !important;
    }

    /* ══════════════════════════════════════════════════════
       DIARY / SCHEDULE – stacked single column
       ══════════════════════════════════════════════════════ */
    .diary-module,
    .diary-module.meeting-three-col,
    .diary-module.event-three-col {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        grid-template-columns: unset !important;
    }

    /* Diary visuals (agenda list) */
    .diary-visuals {
        order: 2 !important;
        padding: 12px !important;
        border-radius: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        background: var(--white) !important;
        border: 1px solid var(--border-soft) !important;
    }

    /* Meeting list column */
    #screen-event-card .diary-visuals.meeting-list-col {
        padding: 12px !important;
        border-radius: 12px !important;
        background: var(--white) !important;
        border: 1px solid var(--border-soft) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Diary form */
    .diary-form {
        order: 1 !important;
        padding: 14px !important;
        border-radius: 12px !important;
        border: 1px solid var(--border-soft) !important;
        background: var(--white) !important;
    }

    #screen-event-card .diary-module.event-three-col .diary-form {
        background: var(--bg-app) !important;
    }

    #screen-event-card .diary-form.meeting-editor-col {
        padding: 14px !important;
        border-radius: 12px !important;
        border: 1px solid var(--border-soft) !important;
        background: var(--white) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .diary-form-header {
        font-size: 14px !important;
        font-weight: 700 !important;
        margin-bottom: 12px !important;
        padding-bottom: 8px !important;
        color: var(--primary) !important;
    }

    .diary-form-grid {
        grid-template-columns: 1fr 1fr !important;
        row-gap: 12px !important;
        column-gap: 8px !important;
    }

    #screen-event-card .diary-module.event-three-col .diary-form {
        width: 100% !important;
        border: 0 !important;
    }

    #screen-event-card .diary-module.event-three-col .diary-form-grid {
        margin-top: 0 !important;
    }

    .diary-form-grid .field.diary-full {
        grid-column: 1 / -1;
    }

    .diary-form-grid .event-diary-mobile-title {
        grid-column: 1 / -1;
        margin: 0 0 6px !important;
    }

    #screen-event-card .diary-form.meeting-editor-col .diary-form-grid {
        grid-template-columns: 1fr 1fr !important;
        column-gap: 8px !important;
        row-gap: 12px !important;
    }

    .diary-form-grid .field label {
        font-size: 11px !important;
        font-weight: 600 !important;
        color: var(--text2) !important;
        margin-bottom: 2px !important;
    }

    /* Calendar widget */
    .diary-calendar-widget {
        max-width: 100% !important;
        padding: 12px !important;
        border-radius: 10px !important;
        background: var(--bg-app) !important;
        border: 1px solid var(--border-soft) !important;
    }

    /* Meeting calendar column */
    #screen-event-card .meeting-calendar-col {
        order: 3 !important;
        padding: 12px !important;
        border-radius: 12px !important;
        background: var(--white) !important;
        border: 1px solid var(--border-soft) !important;
        width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    #screen-event-card .meeting-calendar-col.hidden {
        display: none !important;
    }

    #screen-event-card .meeting-calendar-col .meeting-editor-calendar-host {
        margin-bottom: 0 !important;
    }

    #screen-event-card .meeting-calendar-col .diary-calendar-widget {
        max-width: none !important;
        width: 100% !important;
    }

    .diary-cal-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 8px !important;
    }

    .diary-month-title {
        font-weight: 700 !important;
        font-size: 21px !important;
        color: var(--text1) !important;
    }

    .diary-cal-nav-btn {
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        color: var(--text1) !important;
        font-size: 12px !important;
        padding: 6px !important;
        border-radius: 6px !important;
    }

    .diary-cal-grid {
        display: grid !important;
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 3px !important;
        text-align: center !important;
        align-items: center !important;
    }

    .diary-cal-day-name {
        font-size: 10px !important;
        color: var(--text1) !important;
        font-weight: 600 !important;
        margin-bottom: 2px !important;
    }

    .diary-cal-day {
        aspect-ratio: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px !important;
        font-size: 12px !important;
        cursor: pointer !important;
        position: relative !important;
        border: 1px solid transparent !important;
        background: transparent !important;
        color: var(--black) !important;
    }

    .diary-cal-day.active {
        background: transparent !important;
        color: var(--primary) !important;
        font-weight: 700 !important;
        border-color: var(--primary) !important;
    }

    .diary-cal-pad {
        aspect-ratio: 1 !important;
    }

    /* Diary buttons */
    #screen-event-card .diary-module.event-three-col .diary-btn-group {
        position: static !important;
        margin: 16px 0 24px 0 !important;
        padding: 0 !important;
        width: 100%;
        gap: 0 !important;
        border-top: 0 !important;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    #screen-event-card .diary-module.event-three-col .diary-btn-group .btn.btn-primary {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 56px;
        padding: 0 24px !important;
        width: 100% !important;
        border: none !important;
        border-radius: 12px !important;
        background: var(--primary) !important;
        color: var(--white) !important;
        font-size: 18px !important;
        font-weight: 500 !important;
        font-family: inherit;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(30, 78, 132, 0.2);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    #screen-event-card .diary-module.event-three-col .diary-btn-group .btn.btn-primary:active {
        transform: scale(0.95);
        box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    }

    #screen-event-card .diary-module.event-three-col .diary-btn-group .btn.btn-primary svg {
        width: 20px !important;
        height: 20px !important;
        stroke-width: 1.5 !important;
        flex-shrink: 0;
    }

    #screen-event-card .diary-module.event-three-col .diary-btn-group .btn.btn-primary span {
        font-size: 0 !important;
        white-space: nowrap;
    }

    #screen-event-card .diary-module.event-three-col .diary-btn-group .btn.btn-primary span::after {
        content: 'שמור אירוע ביומן';
        font-size: 18px;
    }

    /* ── Agenda cards ── */
    .diary-agenda-list {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .diary-agenda-title {
        font-size: 13px !important;
        font-weight: 700 !important;
        color: var(--text1) !important;
    }

    .diary-agenda-card {
        background: var(--white) !important;
        padding: 10px 12px !important;
        border-radius: 10px 8px 8px 10px !important;
        border: 1px solid var(--border-soft) !important;
        border-right: 3px solid transparent !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .diary-agenda-card[data-schedule-type="1"]  { border-right-color: var(--lbl1) !important; }
    .diary-agenda-card[data-schedule-type="4"]  { border-right-color: var(--lbl5) !important; }
    .diary-agenda-card[data-schedule-type="2"]  { border-right-color: var(--lbl2) !important; }
    .diary-agenda-card[data-schedule-type="3"]  { border-right-color: var(--delete) !important; }
    .diary-agenda-card[data-schedule-type="5"]  { border-right-color: var(--dark-gray) !important; }
    .diary-agenda-card[data-schedule-type="meeting"] { border-right-color: var(--primary) !important; }

    .diary-agenda-left {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-width: 0 !important;
    }

    .diary-time-box {
        font-weight: 800 !important;
        font-size: 14px !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }

    .diary-info-box {
        min-width: 0 !important;
    }

    .diary-info-box h4 {
        margin: 0 !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        color: var(--black) !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .diary-info-box p {
        margin: 0 !important;
        font-size: 11px !important;
        color: var(--text2) !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .diary-action-icon {
        color: var(--text1) !important;
        flex: 0 0 auto !important;
    }

    .diary-agenda-empty {
        text-align: center !important;
        color: var(--placeholder) !important;
        padding: 14px !important;
        border: 1px dashed var(--border-soft) !important;
        border-radius: 10px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        font-size: 12px !important;
    }

    .diary-agenda-items {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* Reserved summary */
    .diary-reserved-summary {
        border-radius: 10px !important;
        padding: 10px 12px !important;
    }

    /* Schedule summary */
    .event-schedule-summary {
        border-radius: 10px !important;
        padding: 10px 12px !important;
        flex-direction: column !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    .event-schedule-summary-actions {
        justify-content: flex-start !important;
    }

    .event-schedule-actions {
        flex-direction: column !important;
        width: 100% !important;
    }

    .event-schedule-actions .btn {
        width: 100% !important;
        height: 44px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
        justify-content: center !important;
    }

    /* ══════════════════════════════════════════════════════
       MEETING CARDS (.mtg-card) inside diary
       ══════════════════════════════════════════════════════ */
    .event-meeting-box {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .mtg-card {
        padding: 10px 12px !important;
        border-radius: 10px 8px 8px 10px !important;
        border-right-width: 3px !important;
    }

    .mtg-card-info h4 {
        font-size: 14px !important;
        margin-bottom: 3px !important;
    }

    .mtg-card-phone {
        font-size: 12px !important;
        font-weight: 400 !important;
    }

    .mtg-card-meta {
        font-size: 12px !important;
    }

    /* Meeting list header */
    #screen-event-card .meeting-list-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
        padding-bottom: 10px !important;
        border-bottom: 1px solid var(--border-soft) !important;
    }

    #screen-event-card .meeting-list-title {
        color: var(--primary) !important;
        font-size: 14px !important;
        font-weight: 700 !important;
    }

    #screen-event-card .meeting-list-new-btn {
        font-size: 12px !important;
        padding: 6px 10px !important;
        border-radius: 8px !important;
    }

    /* Quick pill tabs */
    #screen-event-card .diary-form-top .quick-pill-tabs-host {
        margin-top: 20px !important;
        margin-bottom: 10px !important;
    }

    #screen-event-card .diary-form-top .quick-pill-tabs-title {
        display: block !important;
        text-align: center !important;
        color: var(--text2) !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        margin-bottom: 6px !important;
    }

    #screen-event-card .diary-form-top .quick-pill-tabs {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        flex-wrap: wrap !important;
    }

    #screen-event-card .diary-form-top .quick-pill-tab {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        min-height: 28px !important;
        padding: 0 10px !important;
        border-radius: 999px !important;
        border: 1px solid var(--border-soft) !important;
        background: var(--white) !important;
        color: var(--text1) !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        cursor: pointer !important;
    }

    #screen-event-card .diary-form-top .quick-pill-tab.active {
        border-color: var(--primary) !important;
        background: var(--primary) !important;
        color: var(--white) !important;
    }

    #screen-event-card .diary-form-top .meeting-empty-cta-btn {
        width: 100% !important;
        min-height: 44px !important;
        border-radius: 10px !important;
        font-size: 15px !important;
        font-weight: 700 !important;
    }

    /* Attendance toggle */
    .mtg-attendance-toggle {
        padding: 3px !important;
        border-radius: 8px !important;
        gap: 3px !important;
    }

    .mtg-att-btn {
        border-radius: 6px !important;
        min-height: 38px !important;
        font-size: 13px !important;
        padding: 6px 8px !important;
    }

    /* Editor title */
    .mtg-editor-title {
        font-size: 14px !important;
        text-align: center !important;
        margin-bottom: 4px !important;
    }

    /* Foreign warning */
    .mtg-foreign-warning {
        padding: 8px 10px !important;
        border-radius: 8px !important;
        font-size: 11px !important;
    }

    /* Meeting form separator */
    .mtg-form-separator {
        margin: 8px 0 !important;
    }

    /* Busy warning */
    .mtg-calendar-busy-warning {
        font-size: 11px !important;
        margin-top: 8px !important;
    }

    /* Nav tabs inside diary form */
    #screen-event-card .diary-form-top .calendar-nav-tabs {
        margin-bottom: 12px !important;
    }

    #screen-event-card .diary-form-top .calendar-nav-tab {
        height: 34px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }

    /* ══════════════════════════════════════════════════════
       ORDER TAB (פרטי הזמנה)
       ══════════════════════════════════════════════════════ */
    #screen-event-card .event-order-tab-panel .form-container,
    #screen-event-card .event-payments-tab-panel .form-container {
        max-width: 100% !important;
    }

    /* Order contract grid → stacked */
    .order-contract-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .order-contract-main-col,
    .order-contract-side-col {
        width: 100% !important;
    }

    .order-section-box {
        margin-bottom: 12px !important;
    }

    .order-section-title-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .order-section-title-row .order-vat-mode-select {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Order table → card layout */
    #screen-event-card .order-table {
        border-radius: 10px !important;
        overflow: hidden !important;
    }

    #screen-event-card .order-table-head {
        display: none !important;
    }

    #screen-event-card .order-table-row.lines-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        padding: 12px !important;
        border-bottom: 1px solid var(--border-soft);
        position: relative;
    }

    #screen-event-card .order-table-row.lines-grid:last-child {
        border-bottom: 0;
    }

    #screen-event-card .order-table-cell {
        padding: 0 !important;
    }

    #screen-event-card .order-table-cell .input,
    #screen-event-card .order-table-cell input {
        height: 42px !important;
        font-size: 16px !important;
        text-align: right !important;
    }

    #screen-event-card .order-table-cell .total-cell {
        font-size: 14px !important;
        text-align: right !important;
    }

    /* Delete button position */
    #screen-event-card .order-table-row .order-delete-cell {
        position: absolute;
        top: 8px;
        left: 8px;
    }

    /* Order summary */
    .order-summary-wrap {
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 10px !important;
        padding: 10px 12px !important;
    }

    .leads-history-row.order-summary-row {
        padding: 6px 0 !important;
    }

    .order-summary-row .leads-history-meta {
        font-size: 13px !important;
    }

    .order-summary-row .leads-history-text {
        font-size: 13px !important;
        font-weight: 600 !important;
    }

    .order-summary-row.grand-total .leads-history-meta,
    .order-summary-row.grand-total .leads-history-text {
        font-size: 15px !important;
        font-weight: 800 !important;
    }

    /* Order add button */
    #screen-event-card .order-btn-add {
        width: 100% !important;
        height: 42px !important;
        border-radius: 10px !important;
        justify-content: center !important;
        font-size: 14px !important;
    }

    /* ══════════════════════════════════════════════════════
       PAYMENTS TAB (תשלומים)
       ══════════════════════════════════════════════════════ */
    #screen-event-card .event-payments-tab-panel .order-section-box {
        max-width: 100% !important;
    }

    #screen-event-card .event-payments-tab-panel .order-table-head {
        display: none !important;
    }

    #screen-event-card .event-payments-tab-panel .order-table-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        padding: 12px !important;
        border-bottom: 1px solid var(--border-soft);
        position: relative;
    }

    #screen-event-card .event-payments-tab-panel .order-table-row:last-child {
        border-bottom: 0;
    }

    .order-payment-note {
        border-radius: 10px !important;
    }

    /* ══════════════════════════════════════════════════════
       QUOTE / CONTRACT ACTIONS & PREVIEW
       ══════════════════════════════════════════════════════ */
    #screen-event-card .editor-actions-extra {
        flex-direction: column !important;
        gap: 8px !important;
        padding: 10px !important;
        border-radius: 10px !important;
    }

    #screen-event-card .editor-actions-extra .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px 14px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
    }

    /* Quote/Contract preview modal → fullscreen */
    .documents-editor-container.print-preview-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        transform: none !important;
        z-index: 3000 !important;
        display: flex;
        flex-direction: column;
    }

    .documents-editor-container.print-preview-modal.is-open {
        transform: none !important;
    }

    .documents-editor-container.print-preview-modal .modal-close {
        position: absolute;
        top: 18px;
        left: 29px;
        width: 36px;
        height: 36px;
        z-index: 5;
    }

    .documents-editor-container.print-preview-modal .editor-topbar {
        padding: 10px 14px !important;
        background: var(--white);
        border-bottom: 1px solid var(--border-soft);
        position: sticky;
        top: 0;
        z-index: 4;
    }

    .documents-editor-container.print-preview-modal .editor-topbar .editor-title {
        font-size: 14px !important;
        text-align: center;
    }

    .documents-editor-container.print-preview-modal .order-doc-split {
        flex-direction: column !important;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .documents-editor-container.print-preview-modal .order-doc-hint-row {
        flex-direction: column !important;
        padding: 8px 12px !important;
        gap: 6px;
    }

    .documents-editor-container.print-preview-modal .order-doc-hint-edit {
        flex: none !important;
    }

    .documents-editor-container.print-preview-modal .order-doc-hint-preview {
        border-inline-start: 0 !important;
        border-top: 1px solid var(--border-soft);
        padding-top: 6px;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit {
        flex: none !important;
        width: 100% !important;
        padding: 12px !important;
        overflow: visible !important;
    }

    .documents-editor-container.print-preview-modal .order-doc-preview {
        flex: none !important;
        width: 100% !important;
        min-height: 60vh;
    }

    .documents-editor-container.print-preview-modal .order-doc-preview iframe {
        width: 100% !important;
        min-height: 60vh;
    }

    .documents-editor-container.print-preview-modal .toolbar {
        flex-wrap: wrap;
        gap: 6px !important;
        padding: 10px 12px !important;
        justify-content: center !important;
        border-top: 1px solid var(--border-soft);
        background: var(--white);
        position: sticky;
        bottom: 0;
        z-index: 4;
    }

    .documents-editor-container.print-preview-modal .toolbar .btn {
        font-size: 13px !important;
        padding: 8px 12px !important;
        border-radius: 8px !important;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .doc-invitee-block {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-head {
        display: none !important;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-table-row.lines-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        padding: 10px !important;
    }

    .documents-editor-container.print-preview-modal .order-doc-edit .order-summary-wrap {
        max-width: 100% !important;
        margin: 0 !important;
    }

    /* ══════════════════════════════════════════════════════
       TASKS TAB (משימות)
       ══════════════════════════════════════════════════════ */
    #screen-event-card .event-tasks-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    #screen-event-card .event-tasks-card .lead-inline-task-form {
        padding: 12px !important;
        border-radius: 10px !important;
    }

    #screen-event-card .event-tasks-card .lead-inline-task-form .lead-reminder-second-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    #screen-event-card .event-tasks-card .lead-reminder-datetime-picker .tw-dp-trigger {
        max-width: 100% !important;
        width: 100% !important;
    }

    #screen-event-card .event-tasks-card .lead-inline-task-form .lead-task-buttons {
        width: 100%;
        justify-content: stretch;
    }

    #screen-event-card .event-tasks-card .lead-inline-task-form .lead-task-buttons .btn {
        flex: 1;
        justify-content: center;
    }

    #screen-event-card .event-task-card {
        padding: 10px !important;
        border-radius: 10px !important;
    }

    /* ══════════════════════════════════════════════════════
       TIMELINE – hidden on mobile (desktop only)
       ══════════════════════════════════════════════════════ */
    .event-timeline-card {
        display: none !important;
    }

    .event-editor .comments-box.lead-timeline-card,
    .event-editor .comments-box.lead-extras-card {
        display: none !important;
    }

    /* ══════════════════════════════════════════════════════
       SAVE BUTTON – floating FAB
       ══════════════════════════════════════════════════════ */
    #screen-event-card .event-editor-container.is-open .event-editor > .editor-actions {
        display: none !important;
    }

    #screen-event-card .meeting-modal-save-footer {
        display: none !important;
    }

    #screen-event-card .meeting-modal-save-footer .meeting-modal-save-fab {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 56px !important;
        min-height: 56px !important;
        padding: 0 24px !important;
        box-sizing: border-box;
        width: 100%;
        border: none;
        border-radius: 12px;
        background: var(--primary);
        color: var(--white);
        font-size: 18px;
        font-weight: 500;
        line-height: 1;
        font-family: inherit;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(30, 78, 132, 0.2);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    #screen-event-card .meeting-modal-save-footer .meeting-modal-save-fab:active {
        transform: scale(0.95);
        box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    }

    #screen-event-card .meeting-modal-save-footer .meeting-modal-save-fab svg {
        width: 20px;
        height: 20px;
        stroke-width: 1.5;
        flex-shrink: 0;
    }

    #screen-event-card .meeting-modal-save-footer .meeting-modal-save-fab span {
        white-space: nowrap;
    }

    #screen-event-card .event-editor.hide-mobile-save-fab .meeting-modal-save-footer {
        display: none !important;
    }

    /* ══════════════════════════════════════════════════════
       FORM GRID & MISC
       ══════════════════════════════════════════════════════ */
    .event-editor .form-grid {
        padding-top: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-top: 0 !important;
        background: var(--bg-app) !important;
    }

    /* Multi-select panel */
    .event-editor-container.is-open .multi-select-panel {
        max-height: 45vh !important;
    }

    /* Comments box / accordion */
    .event-editor-container.is-open .comments-box {
        border-radius: 12px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .comments-box .accordion-title {
        padding: 12px 14px !important;
    }

    .comments-box .accordion-content {
        padding: 0 14px 12px !important;
    }

    /* Date/Time pickers */
    #screen-event-card .tw-dp-root,
    #screen-event-card .tw-tp-wrapper,
    #screen-event-card .tw-dtp-root {
        width: 100% !important;
    }

    /* Estimated date wrap */
    #screen-event-card .estimated-date-wrap {
        flex-direction: row;
        gap: 8px;
    }

    #screen-event-card .estimated-date-wrap .estimated-date-input {
        flex: 1;
    }

    #screen-event-card .estimated-date-wrap .tw-date-picker {
        width: unset;
    }

    #screen-event-card .estimated-date-wrap .tw-date-picker.is-open .tw-dp-popover {
        margin-top: -300px;
    }

    #screen-event-card .diary-form-top .tw-date-picker.is-open .tw-dp-popover {
        margin-left: -300px;
    }

    #screen-event-card .diary-module.event-three-col .tw-date-picker.is-open .tw-dp-popover {
        left: 50% !important;
        right: auto !important;
        margin-left: 0 !important;
        transform: translateX(-50%);
        max-width: calc(100vw - 24px);
    }

    /* Contact mini card */
    .event-contact-mini {
        padding: 12px !important;
        margin: 0 0 10px !important;
        border-radius: 10px !important;
        background: var(--white);
        border: 1px solid var(--border-soft);
    }

    /* Status badge */
    .event-status-badge {
        font-size: 12px !important;
        padding: 2px 10px !important;
    }

    /* Overlay */
    #event-card-overlay.ui-overlay {
        display: none !important;
    }

    /* Richtext editor */
    #screen-event-card .richtext-editor {
        font-size: 14px !important;
        min-height: 80px;
    }

    /* Better touch targets */
    #screen-event-card .btn {
        min-height: 40px;
    }

    /* Number inputs – no spinners */
    #screen-event-card .order-table-cell input[type="number"]::-webkit-outer-spin-button,
    #screen-event-card .order-table-cell input[type="number"]::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    /* Print badge */
    .print-badge {
        font-size: 11px !important;
        padding: 2px 8px !important;
    }

    /* Prevent horizontal overflow */
    #screen-event-card .event-editor-container.is-open,
    #screen-event-card .event-editor-container.is-open * {
        max-width: 100vw;
    }

    /* Collapsible sections */
    .event-collapsible-title {
        padding: 10px 12px !important;
        border-radius: 10px !important;
        font-size: 13px !important;
    }

    /* Phone row in card section */
    .event-card-section .phone-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
}

/* =====================================================================
   EVENT CARD – MOBILE MATCH (order/contract + add meeting)
   Scoped to mobile only and keeps existing logic untouched.
   ===================================================================== */
@media (max-width: 767px) {
    #screen-event-card .event-order-tab-panel {
        background: var(--bg-app);
    }

    #screen-event-card .event-order-tab-panel .content-scroll {
        padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important;
    }

    #screen-event-card .event-order-tab-panel .order-contract-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    #screen-event-card .event-order-tab-panel .order-section-box {
        background: var(--white);
        border: 1px solid var(--border-soft);
        border-radius: 12px;
        padding: 12px;
        box-shadow: none;
    }

    #screen-event-card .event-order-tab-panel .order-section-title {
        color: var(--primary);
        font-size: 14px;
        font-weight: 700;
    }

    #screen-event-card .event-order-tab-panel .order-table {
        margin-bottom: 0;
    }

    #screen-event-card .event-order-tab-panel .order-table-row.lines-grid {
        background: var(--white);
        border: 1px solid var(--border-soft);
        border-radius: 10px;
        margin-bottom: 10px;
        padding: 12px;
    }

    #screen-event-card .event-order-tab-panel .order-summary-wrap {
        border-radius: 10px;
        border: 1px solid var(--border-soft);
        background: var(--bg-app);
    }

    #screen-event-card .event-order-tab-panel .order-top-actions-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2300;
        display: none !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        margin: 0;
        border-top: 1px solid var(--border-soft);
        background: var(--white);
        border-radius: 0;
    }

    #screen-event-card .event-order-tab-panel .order-top-actions-bar .btn {
        min-height: 44px;
        border-radius: 10px;
        justify-content: center;
        font-size: 14px;
        font-weight: 700;
    }

    #screen-event-card .event-order-tab-panel .order-top-actions-bar .btn.primary {
        background: var(--primary);
        border-color: var(--primary);
        color: var(--white);
    }

    #screen-event-card .event-order-mobile-contract-shell {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0;
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }

    #screen-event-card .event-order-tab-panel .order-summary-section {
        display: none !important;
    }

    #screen-event-card .event-order-tab-panel .order-lines-section {
        display: none !important;
    }

    #screen-event-card .event-order-tab-panel .order-quote-notes-section {
        display: none !important;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-vat-group {
        display: none;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-vat-select-shell {
        padding: 10px 16px;
        margin-top: -37px;
        background: var(--white);
        border-bottom: 0;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-vat-group .order-vat-label {
        font-size: 13px;
        font-weight: 600;
        color: var(--text2);
        white-space: nowrap;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-vat-group .order-vat-mode-select {
        flex: 1;
        font-size: 13px;
        min-height: 36px;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-vat-select-shell .order-vat-mode-select {
        width: 100%;
        font-size: 13px;
        min-height: 44px;
        border: 0 !important;
        background-color: var(--lightgray) !important;
    }

    #screen-event-card .event-order-mobile-contract-shell .order-vat-mode-select {
        color: var(--text1);
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-header {
        text-align: center;
        padding: 18px 16px 14px;
        border-bottom: 1px solid var(--border-soft);
        background: var(--white);
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-title {
        font-size: 18px;
        font-weight: 700;
        color: var(--primary);
        margin: 0 0 6px;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-meta {
        display: flex;
        justify-content: center;
        gap: 16px;
        font-size: 13px;
        color: var(--text2);
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-section {
        padding: 14px 16px;
        border-bottom: 1px solid var(--border-soft);
        background: var(--white);
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-section-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--primary);
        margin: 0 0 10px;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-section-body {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-row {
        font-size: 14px;
        color: var(--text1);
        line-height: 1.5;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-row-label {
        font-weight: 600;
        color: var(--text2);
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-row-value {
        font-weight: 400;
    }

    #screen-event-card .event-order-mobile-contract-shell .mobile-order-lines-host {
        padding: 0;
        margin-inline: -16px;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-grid {
        display: block;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-head.mc-lines-grid {
        display: none;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-body {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        background: var(--white);
        border: none;
        border-radius: 12px;
        padding: 0 14px 14px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(1) {
        width: 100%;
        margin-inline: 0;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(2) {
        width: calc(33.33% - 5px);
        position: relative;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(3) {
        width: calc(66.66% - 5px);
        position: relative;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(2)::before,
    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(3)::before {
        font-size: 10px;
        color: var(--text3);
        position: absolute;
        top: -7px;
        right: 8px;
        background: var(--white);
        padding: 0 4px;
        z-index: 1;
        pointer-events: none;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(2)::before {
        content: "כמות";
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(3)::before {
        content: "מחיר (₪)";
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(4) {
        display: none;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(5) {
        display: none;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(2) .input,
    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(3) .input,
    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(2) input,
    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .order-table-row.mc-lines-grid > .order-table-cell:nth-child(3) input {
        width: 100% !important;
        max-width: 100% !important;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .input {
        font-size: 14px;
        padding: 8px 12px;
        min-height: 40px;
        border: 1px solid var(--border-soft);
        border-radius: 8px;
        background: var(--white);
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .input[placeholder*="תיאור"],
    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table input[placeholder*="תיאור"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .phone-delete {
        display: flex;
        color: var(--red);
        padding: 4px;
        border: none;
        background: none;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .phone-delete svg {
        width: 22px;
        height: 22px;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-lines-table .total-cell {
        display: none;
    }

    #screen-event-card .event-order-mobile-contract-shell .order-lines-actions-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        margin-top: -8px;
    }

    #screen-event-card .event-order-mobile-contract-shell .order-lines-actions-row .order-btn-add {
        display: flex;
        align-items: center;
        gap: 4px;
        color: var(--primary);
        font-weight: 600;
        font-size: 14px;
        padding: 10px;
        background: none;
        border: none;
    }

    #screen-event-card .event-order-mobile-contract-shell .order-lines-actions-row .order-btn-delete-row {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 4px;
        border: none;
        background: none;
        color: var(--red);
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-summary {
        margin-top: 12px;
        border-top: 1px solid var(--border-soft);
        padding-top: 10px;
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-summary-row {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        font-size: 13px;
        color: var(--text2);
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-summary-grand {
        font-weight: 700;
        font-size: 15px;
        color: var(--primary);
        border-top: 1px solid var(--border-soft);
        margin-top: 6px;
        padding-top: 8px;
    }

    #screen-event-card .event-order-mobile-contract-shell .mobile-contract-notes {
        min-height: 80px;
        font-size: 14px;
    }

    #screen-event-card .event-order-mobile-contract-shell .checkbox-wrapper {
        display: flex;
        align-items: center;
        gap: 1.2rem;
        padding: 22px 16px 0;
        justify-content: flex-start;
    }

    #screen-event-card .event-order-mobile-contract-shell .checkbox-label {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        cursor: pointer;
        font-size: 15px;
        color: var(--text1);
        user-select: none;
    }

    #screen-event-card .event-order-mobile-contract-shell .checkbox-label input[type="checkbox"] {
        display: none;
    }

    #screen-event-card .event-order-mobile-contract-shell .checkbox-label .checkmark {
        width: 18px;
        height: 18px;
        border: 2px solid var(--border-soft);
        border-radius: 5px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--white);
        transition: all 0.2s;
        flex-shrink: 0;
    }

    #screen-event-card .event-order-mobile-contract-shell .checkbox-label input[type="checkbox"]:checked ~ .checkmark {
        background: var(--primary);
        border-color: var(--primary);
    }

    #screen-event-card .event-order-mobile-contract-shell .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);
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-action-bar {
        padding: 22px 16px 12px;
        background: var(--white);
    }

    #screen-event-card .event-order-mobile-contract-shell .mc-action-bar .btn {
        width: 100%;
        min-height: 48px;
        border-radius: 10px;
        justify-content: center;
        font-size: 15px;
        font-weight: 700;
    }

    #screen-event-card .documents-editor-container.print-preview-modal {
        background: var(--bg-app);
    }

    #screen-event-card .documents-editor-container.print-preview-modal .modal-body {
        padding-top: 52px;
    }

    #screen-event-card .documents-editor-container.print-preview-modal::before {
        content: 'הפקת מסמך';
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--white);
        border-bottom: 1px solid var(--border-soft);
        color: var(--black);
        font-size: 16px;
        font-weight: 700;
        z-index: 3;
    }

    #screen-event-card .documents-editor-container.print-preview-modal .modal-close {
        top: 18px;
        left: 29px;
        z-index: 6;
    }

    #screen-event-card .documents-editor-container.print-preview-modal .toolbar {
        display: grid;
        grid-template-columns: 1fr auto auto;
        align-items: center;
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    }

    #screen-event-card .documents-editor-container.print-preview-modal .toolbar .btn {
        min-height: 42px;
        border-radius: 10px;
        justify-content: center;
    }

    #screen-event-card .documents-editor-container.print-preview-modal .toolbar #menuShareWhatsappBtn {
        flex-direction: row;
    }

    #screen-event-card .documents-editor-container.print-preview-modal .toolbar .btn:first-child {
        background: var(--primary);
        border-color: var(--primary);
        color: var(--white);
        font-weight: 700;
    }

    #screen-event-card .diary-module.meeting-three-col {
        display: block !important;
    }

    #screen-event-card .meeting-calendar-col {
        order: 1 !important;
    }

    #screen-event-card .diary-visuals.meeting-list-col {
        order: 2 !important;
    }

    #screen-event-card .diary-form.meeting-editor-col {
        order: 3 !important;
        border-radius: 16px 16px 0 0 !important;
        border-top: 1px solid var(--border-soft) !important;
        box-shadow: none;
    }

    #screen-event-card .meeting-empty-cta-wrap:not(.hidden) {
        position: fixed;
        left: 16px;
        bottom: calc(84px + env(safe-area-inset-bottom));
        margin: 0 !important;
        z-index: 2250;
    }

    #screen-event-card .meeting-empty-cta-wrap:not(.hidden) .meeting-empty-cta-btn {
        width: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;
        height: 56px !important;
        min-height: 56px !important;
        border-radius: 999px !important;
        padding: 0 !important;
        font-size: 0 !important;
        line-height: 0;
        box-shadow: none;
    }

    #screen-event-card .meeting-empty-cta-wrap:not(.hidden) .meeting-empty-cta-btn::before {
        content: '+';
        font-size: 30px;
        line-height: 1;
        font-weight: 400;
    }

    #screen-event-card .meeting-list-header {
        margin-bottom: 8px !important;
        padding-bottom: 8px !important;
        border-bottom: 1px solid var(--border-soft) !important;
    }

    .event-editor-container.is-open .event-editor {
        padding-bottom: unset;
    }

    #screen-event-card .content-scroll {
        margin-top: 30px;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child > .diary-btn-group,
    #screen-event-card .basic-mobile-inline-save {
        position: static !important;
        margin: 16px 0 24px 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child > .diary-btn-group > .btn.btn-primary,
    #screen-event-card .basic-mobile-inline-save > .meeting-modal-save-fab,
    #screen-event-card .basic-mobile-inline-save > .btn.btn-primary {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 56px;
        padding: 0 24px !important;
        width: 100% !important;
        border: none !important;
        border-radius: 12px !important;
        background: var(--primary) !important;
        color: var(--white) !important;
        font-size: 18px !important;
        font-weight: 500 !important;
        font-family: inherit;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(30, 78, 132, 0.2);
        -webkit-tap-highlight-color: transparent;
    }

    #screen-event-card .basic-mobile-inline-save > .meeting-modal-save-fab,
    #screen-event-card .basic-mobile-inline-save > .btn.btn-primary {
        width: 90% !important;
        margin-inline: auto !important;
    }

    #screen-event-card .diary-module.event-three-col .diary-btn-group .btn.btn-primary:has(.lucide-check) {
        height: auto !important;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child > .diary-btn-group > .btn.btn-primary svg,
    #screen-event-card .basic-mobile-inline-save > .meeting-modal-save-fab svg,
    #screen-event-card .basic-mobile-inline-save > .btn.btn-primary svg {
        width: 20px !important;
        height: 20px !important;
        stroke-width: 1.5 !important;
        flex-shrink: 0;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child.active > .content-centered,
    #screen-event-card .form-tabs-content > .form-tab-panel:first-child.active > .content-centered > .content-scroll,
    #screen-event-card .form-tabs-content > .form-tab-panel:nth-child(2).active > .content-scroll,
    #screen-event-card .form-tabs-content > .form-tab-panel:nth-child(2).active .diary-form {
        padding-bottom: 24px !important;
        box-sizing: border-box;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child.active {
        min-height: 0;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child.active > .content-centered {
        min-height: 0;
    }

    #screen-event-card .form-tabs-content > .form-tab-panel:first-child.active > .content-centered > .content-scroll {
        min-height: 0;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    #screen-event-card .diary-module.meeting-three-col .meeting-calendar-col,
    #screen-event-card .diary-module.event-three-col .meeting-calendar-col,
    #screen-event-card .meeting-list-header {
        display: none !important;
    }

    #screen-event-card .form-section .field.col-2>div,
    #screen-event-card .form-section .field > div,
    #screen-event-card .diary-form.meeting-editor-col .diary-form-grid .field>div,
    #screen-event-card .diary-module.event-three-col .diary-form .field>div {
        box-shadow: unset;
        border: unset;
        padding: 0 !important;
        border-radius: unset !important;
        margin-top: 5px;
    }

    #screen-event-card .diary-module.meeting-three-col .diary-form-grid .field,
    #screen-event-card .diary-module.event-three-col .diary-form .field {
        margin-top: 10px;
    }

    .mtg-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
        cursor: pointer;
        position: relative;
        z-index: 1;
    }

    .mtg-card-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 5px;
    }

    .mtg-card-meta {
        font-size: 13px;
        color: var(--text2);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0;
        flex-wrap: nowrap;
    }

    .mtg-card-name-wrap {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .mtg-card-info h4 {
        margin: 0;
        font-size: 15px;
        font-weight: 700;
        color: var(--black);
    }

    .mtg-card-top .mtg-status-badge {
        margin-inline-start: 0;
        flex: 0 0 auto;
    }

    .mtg-status-badge {
        padding: 2px 8px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
    }

    .mtg-sb-green {
        background: var(--lbl7);
        color: var(--lbl14);
    }

    .mtg-sb-red {
        background: var(--lbl8);
        color: var(--white);
    }

    .mtg-sb-blue {
        background: var(--lightblue);
        color: var(--primary);
    }

    .mtg-card-action {
        flex: 0 0 auto;
        font-size: 14px;
        transition: color 0.2s;
    }

    .mtg-attendance-toggle {
        display: flex;
        background: var(--lightgray);
        padding: 4px;
        border-radius: 10px;
        gap: 4px;
    }

    .mtg-att-btn {
        flex: 1;
        border: 1px solid var(--border-soft);
        padding: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
        font-family: inherit;
    }

    .mtg-att-btn:disabled {
        opacity: 0.45;
        cursor: not-allowed;
        pointer-events: none;
    }

    .mtg-att-btn.mtg-att-pending {
        background: var(--white);
        color: var(--primary);
        box-shadow: 0 3px 8px rgba(30, 74, 133, 0.12);
        border-color: #bfdbfe;
        font-weight: 800;
    }

    #screen-event-card .mtg-att-btn {
        border-radius: 8px;
        min-height: 40px;
        font-size: 15px;
    }
}

/* =====================================================================
   PAYMENTS & RECEIPTS TAB – Design alignment
   ===================================================================== */

#screen-event-card .event-payments-tab-panel .order-top-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 0 18px;
    margin: 0 0 6px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border-soft);
    border-radius: 0;
}

#screen-event-card .event-payments-tab-panel .order-top-actions-bar .btn {
    min-height: 38px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s, transform 0.2s;
}

#screen-event-card .event-payments-tab-panel .order-top-actions-bar .btn.primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(30, 78, 132, 0.18);
}

#screen-event-card .event-payments-tab-panel .order-section-title {
    color: var(--primary);
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: max-content;
}

#screen-event-card .event-payments-tab-panel .order-section-card {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

#screen-event-card .event-payments-tab-panel .order-section-card .font-sml {
    color: var(--text1);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}

#screen-event-card .event-payments-tab-panel .order-section-card .table-empty {
    text-align: center;
    padding: 36px 20px;
    color: var(--text1);
    font-size: 14px;
    background: var(--bg-app);
    border-radius: 10px;
    border: 1px dashed var(--border-soft);
}

#screen-event-card .event-payments-tab-panel .order-section-card .table-row {
    display: grid;
    grid-template-columns: 0.8fr 0.8fr 1fr 0.8fr 0.7fr 0.8fr 0.9fr;
    gap: 8px;
    align-items: center;
    padding: 12px 8px;
    border-bottom: 1px solid var(--bg-app);
    font-size: 14px;
    color: var(--text1);
    transition: background-color 0.15s;
}

#screen-event-card .event-payments-tab-panel .order-section-card .table-row:last-child {
    border-bottom: 0;
}

#screen-event-card .event-payments-tab-panel .order-section-card .table-row .btn {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 6px;
    min-height: 30px;
}

#screen-event-card .event-payments-tab-panel .event-documents-section-box .table-row {
    grid-template-columns: 0.8fr 0.8fr 1fr 0.8fr 0.7fr 0.8fr minmax(220px, 1.45fr);
}

#screen-event-card .event-payments-tab-panel .event-documents-section-box .table-row > div[data-label="פעולות"] {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

#screen-event-card .event-payments-tab-panel .event-documents-section-box .table-row > div[data-label="פעולות"] .btn {
    min-width: 92px;
    max-width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
}

#screen-event-card .event-payments-tab-panel .order-section-box {
    margin-bottom: 20px;
}

#screen-event-card .event-payments-tab-panel .order-section-title-row {
    margin-bottom: 14px;
    position: relative;
    z-index: 3;
    overflow: visible;
}

#screen-event-card .event-payments-tab-panel .event-payments-section-box {
    overflow: visible;
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-head {
    background: var(--bg-app);
    border-bottom: 1px solid var(--border-soft);
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-head-cell {
    font-size: 13px;
    font-weight: 700;
    color: var(--text2);
    text-align: right;
    padding: 12px 8px;
    border-left: none;
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-row {
    border-bottom: 1px solid var(--bg-app);
    transition: background-color 0.15s;
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-row:last-child {
    border-bottom: 0;
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-cell {
    padding: 10px 8px;
    border-left: none;
    vertical-align: middle;
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-cell .input,
#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-cell input,
#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-cell select {
    background: var(--bg-app);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    color: var(--text1);
    transition: border-color 0.2s;
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-cell .input:focus,
#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-cell input:focus,
#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-cell select:focus {
    border-color: var(--primary);
    background: var(--white);
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-lines-actions-row {
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-btn-add {
    width: auto;
    height: auto;
    min-width: unset;
    min-height: unset;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--primary);
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-btn-add svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary);
    color: var(--primary);
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-cell .btn-sml {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
    min-height: 30px;
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-cell .btn-sml.event-payment-issue-btn {
    width: auto;
    height: auto;
    min-width: unset;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 8px;
    justify-content: center;
    align-self: center;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    border-color: var(--primary);
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-cell.event-payment-actions-cell {
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

#screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-cell.event-payment-actions-cell .font-sml {
    width: 100%;
    margin-bottom: 0;
}

#screen-event-card .event-payments-tab-panel .event-card-supplier-actions .btn {
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.2s;
}

@media (hover: hover) {
    .event-staffing-modal .event-staffing-bulk-row:hover {
        border-color: var(--primary-2);
        box-shadow: 0 4px 12px rgba(30, 78, 132, 0.08);
    }

    .event-staffing-modal .event-staffing-bulk-row.has-conflict:hover {
        border-color: var(--lbl4);
    }

    #screen-event-card .event-payments-tab-panel .order-top-actions-bar .btn:not(.primary):hover {
        background: var(--bg-app);
        transform: translateY(-1px);
    }

    #screen-event-card .event-payments-tab-panel .order-top-actions-bar .btn.primary:hover {
        filter: none;
        opacity: 1;
        transform: translateY(-1px);
    }

    #screen-event-card .event-payments-tab-panel .order-section-card .table-row:hover {
        background: var(--lightblue2);
    }

    #screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-row:hover {
        background: var(--lightblue2);
    }

    #screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table-cell .btn-sml.event-payment-issue-btn:hover {
        background: var(--primary);
        border-color: var(--primary);
        color: var(--white);
    }

    #screen-event-card .event-payments-tab-panel .order-payments-wrap .order-btn-add:hover {
        background: var(--bg-app);
    }

    #screen-event-card .event-payments-tab-panel .event-card-supplier-actions .btn:hover,
    #screen-event-card .event-card-supplier-actions .btn:hover {
        background: var(--lightblue);
        transform: translateY(-1px);
    }
}

@media (max-width: 767px) {
    #screen-event-card .event-payments-tab-panel .order-top-actions-bar {
        flex-direction: column;
        gap: 8px;
        padding: 0 0 14px;
    }

    #screen-event-card .event-payments-tab-panel .order-top-actions-bar .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
        font-size: 14px;
        border-radius: 10px;
    }

    #screen-event-card .event-payments-tab-panel .order-section-title {
        font-size: 15px;
    }

    #screen-event-card .event-payments-tab-panel .order-section-card {
        padding: 14px;
        border-radius: 10px;
    }

    #screen-event-card .event-payments-tab-panel .order-section-card .table-row {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 12px 0;
    }

    #screen-event-card .event-payments-tab-panel .order-section-card .table-row > div::before {
        content: attr(data-label) ": ";
        font-weight: 700;
        color: var(--black);
        font-size: 12px;
    }

    #screen-event-card .event-payments-tab-panel .order-section-card .table-row > div[data-label="פעולות"]::before {
        content: none;
    }

    #screen-event-card .event-payments-tab-panel .order-section-card .table-row > div[data-label="פעולות"] {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding-top: 4px;
    }

    #screen-event-card .event-payments-tab-panel .order-payments-wrap .order-table {
        border-radius: 10px;
    }

    #screen-event-card .event-payments-tab-panel .event-card-suppliers-summary {
        grid-template-columns: 1fr;
    }

    #screen-event-card .event-payments-tab-panel .event-card-suppliers-summary-card {
        padding: 14px;
    }

    #screen-event-card .ec-summary-dashboard {
        margin-bottom: 14px;
    }

    #screen-event-card .ec-summary-row {
        grid-template-columns: 1fr 1fr;
    }

    #screen-event-card .ec-summary-cell {
        padding: 12px 8px;
    }

    #screen-event-card .ec-summary-row-collection .ec-summary-cell:nth-child(2)::after {
        display: none;
    }

    #screen-event-card .ec-summary-row-profit .ec-summary-cell:nth-child(2)::after {
        display: none;
    }

    #screen-event-card .ec-summary-row-collection .ec-summary-cell:nth-child(1),
    #screen-event-card .ec-summary-row-collection .ec-summary-cell:nth-child(2) {
        border-bottom: 1px solid var(--border-soft);
    }

    #screen-event-card .ec-summary-row-profit .ec-summary-cell:nth-child(1),
    #screen-event-card .ec-summary-row-profit .ec-summary-cell:nth-child(2) {
        border-bottom: 1px solid var(--border-soft);
    }

    #screen-event-card .ec-summary-value {
        font-size: 16px;
    }

    #screen-event-card .event-payments-tab-panel .ec-docs-actions-bar {
        flex-direction: column;
        gap: 8px;
        padding: 12px 0;
    }

    #screen-event-card .event-payments-tab-panel .ec-docs-actions-bar .btn {
        width: 100%;
        justify-content: center;
        border-radius: 10px;
    }

    #screen-event-card .event-card-section .event-payments-tab-panel .event-payments-save-footer {
        flex-direction: column;
        align-items: stretch;
    }

    #screen-event-card .event-card-section .event-payments-tab-panel .event-payments-save-btn {
        width: 100%;
        min-width: 0;
    }

    #screen-event-card .diary-module.event-three-col {
        gap: 16px;
    }

    #screen-event-card .form-section:has(.event-postpone-inline) {
        display: block !important;
    }

    #screen-event-card .diary-module.event-three-col .diary-form {
        width: 100%;
        padding: 16px;
    }

    #screen-event-card .diary-module.event-three-col .diary-form-grid > .field {
        order: 10;
    }

    #screen-event-card .diary-module.event-three-col .diary-form-grid > .field.diary-full:has(.tw-date-picker):not(:has(.event-postpone-date-picker)) {
        order: 1;
    }

    #screen-event-card .diary-module.event-three-col .diary-form-grid > .field:has(.event-postpone-inline) {
        order: 2;
    }

    #screen-event-card .diary-module.event-three-col .diary-form-grid > .field:has(.diary-schedule-type-select) {
        order: 3;
    }

    #screen-event-card .diary-module.event-three-col .diary-form-grid > .field.diary-floating-time-start-field {
        order: 4;
    }

    #screen-event-card .diary-module.event-three-col .diary-form-grid > .field.diary-floating-time-end-field {
        order: 5;
    }

    #screen-event-card .diary-module.event-three-col .diary-form .field:has(.event-postpone-inline) {
        grid-column: 1 / -1;
    }

    #screen-event-card .event-postpone-inline {
        gap: 12px;
    }

    #screen-event-card .diary-module.event-three-col .event-postpone-inline > .diary-btn-group {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        position: static !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        z-index: auto !important;
        margin-top: 0;
        margin: 0 !important;
        padding-top: 0;
        padding: 0 !important;
        border-top: 0;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    #screen-event-card .diary-module.event-three-col .event-postpone-inline > .diary-btn-group .btn,
    #screen-event-card .diary-module.event-three-col .event-postpone-toggle {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    #screen-event-card .diary-module.event-three-col .event-postpone-inline > .diary-btn-group .btn.btn-primary {
        display: inline-flex !important;
        gap: 8px !important;
        min-height: 48px;
        padding: 0 16px !important;
        border-radius: 12px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        box-shadow: 0 4px 12px rgba(30, 78, 132, 0.2) !important;
    }

    #screen-event-card .diary-module.event-three-col .event-postpone-inline > .diary-btn-group .btn.btn-primary span {
        font-size: 16px !important;
        white-space: nowrap;
    }

    #screen-event-card .diary-module.event-three-col .event-postpone-inline > .diary-btn-group .btn.btn-primary span::after {
        content: none !important;
    }

    #screen-event-card .diary-module.event-three-col .event-postpone-inline > .diary-btn-group .btn.btn-primary svg {
        width: 20px !important;
        height: 20px !important;
    }

    #screen-event-card .event-postpone-area {
        width: 100%;
        margin-top: 2px;
        visibility: hidden;
        pointer-events: none;
        border-radius: 14px;
    }

    #screen-event-card .event-postpone-area.is-open {
        max-height: 760px;
        margin-top: 8px;
        visibility: visible;
        pointer-events: auto;
    }

    #screen-event-card .event-postpone-area[aria-hidden="true"] {
        max-height: 0 !important;
        opacity: 0 !important;
        margin-top: 0;
        visibility: hidden;
        pointer-events: none;
    }

    #screen-event-card .event-postpone-area[aria-hidden="false"] {
        max-height: 760px;
        opacity: 1;
        margin-top: 8px;
        visibility: visible;
        pointer-events: auto;
    }

    #screen-event-card .event-postpone-panel {
        width: 100%;
        padding: 16px;
        gap: 14px;
    }

    #screen-event-card .event-postpone-step {
        gap: 10px;
        align-items: stretch;
    }

    #screen-event-card .event-postpone-step-title,
    #screen-event-card .event-postpone-panel-title {
        font-size: 15px;
        text-align: right;
    }

    #screen-event-card .event-postpone-choice {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 52px;
        padding: 0 14px;
        text-align: right;
        white-space: normal;
    }

    #screen-event-card .event-postpone-step > .event-postpone-choice:first-of-type {
        margin-top: 10px;
    }

    #screen-event-card .event-postpone-step > .event-postpone-choice:nth-of-type(2) {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    #screen-event-card .event-postpone-date-picker,
    #screen-event-card .event-postpone-date-picker > .tw-dp-trigger,
    #screen-event-card .event-postpone-actions,
    #screen-event-card .event-postpone-actions .btn,
    #screen-event-card .event-postpone-submit,
    #screen-event-card .event-postpone-reason-input {
        width: 100%;
        max-width: none;
    }

    #screen-event-card .event-postpone-date-picker {
        margin-top: 10px;
    }

    #screen-event-card .event-postpone-reason-input {
        margin-top: 10px;
    }

    #screen-event-card .event-postpone-date-picker > .tw-dp-trigger {
        min-height: 50px;
        justify-content: space-between;
    }

    #screen-event-card .event-postpone-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        margin-top: 10px;
    }

    #screen-event-card .event-postpone-actions .btn {
        margin: 0;
        min-height: 48px;
        flex: 0 0 auto;
    }

    #screen-event-card .event-postpone-reason-input {
        min-height: 88px;
    }
}

#screen-event-card .ec-summary-dashboard {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    margin-bottom: 20px;
}

#screen-event-card .event-card-docs-locked-btn-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    position: relative;
    z-index: 4;
    overflow: visible;
}

#screen-event-card .event-card-section:has(.event-payments-tab-panel.active),
#screen-event-card .event-card-section:has(.event-payments-tab-panel.active) .form-tabs-wrapper,
#screen-event-card .event-card-section:has(.event-payments-tab-panel.active) .form-tabs-content,
#screen-event-card .event-card-section:has(.event-payments-tab-panel.active) .event-payments-tab-panel,
#screen-event-card .event-card-section:has(.event-payments-tab-panel.active) .event-payments-tab-panel > .content-scroll {
    overflow: visible;
}

#screen-event-card .ec-summary-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

#screen-event-card .ec-summary-row-profit {
    border-top: 1px solid var(--border-soft);
}

#screen-event-card .ec-summary-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    text-align: center;
    position: relative;
}

#screen-event-card .ec-summary-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--lightblue2);
    color: var(--primary);
    margin-bottom: 2px;
}

#screen-event-card .ec-summary-row-profit .ec-summary-icon {
    background: var(--lightblue2);
    color: var(--primary);
}

#screen-event-card .ec-summary-cell:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 0;
    width: 1px;
    height: 60%;
    background: var(--border-soft);
}

#screen-event-card .ec-summary-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text1);
    white-space: nowrap;
}

#screen-event-card .ec-summary-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    white-space: nowrap;
}

#screen-event-card .ec-summary-value-profit {
    color: var(--primary);
}

#screen-event-card .ec-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    margin-top: 2px;
    border: 1px solid var(--border-soft);
    background: var(--bg-app);
    color: var(--text1);
}

#screen-event-card .ec-summary-badge.tone-success {
    color: var(--lbl14);
    border-color: var(--lbl14);
    background: var(--lbl7);
}

#screen-event-card .ec-summary-badge.tone-danger {
    color: var(--delete);
    border-color: var(--delete);
    background: var(--lbl9);
}

#screen-event-card .ec-summary-badge.tone-info {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--lbl10);
}

#screen-event-card .ec-profit-headline {
    display: none;
}

#screen-event-card .event-payments-tab-panel .ec-docs-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

#screen-event-card .event-payments-tab-panel .event-payments-section-box {
    margin-bottom: 6px;
}

#screen-event-card .event-payments-tab-panel .event-documents-section-box {
    margin-bottom: 12px;
}


