.app-modal .modal-dialog {
    max-width: 520px;
}

.app-modal .modal-content {
    border: 0;
    border-radius: 28px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.app-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 30px 32px 22px;
    border-bottom: 1px solid #eef2f7;
}

.app-modal-kicker {
    margin-bottom: 5px;
    color: #8a94a6;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.app-modal-title {
    margin: 0;
    color: #111827;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
}

.app-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    transition: .18s ease;
}

.app-modal-close:hover {
    background: #e2e8f0;
    color: #1f2937;
}

.app-modal-body {
    padding: 24px 32px 10px;
}

.app-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 22px 32px 30px;
}

.app-modal-actions {
    display: flex;
    gap: 10px;
}

.app-modal-btn-danger-soft {
    border: 1px solid #aeb7c2;
    background: #ffffff;
    color: #667085;
}

.app-modal-btn-danger-soft:hover {
    border-color: #c2410c;
    background: #fff7ed;
    color: #c2410c;
}

.app-modal-field-label {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
}

.app-modal-input,
.app-modal-textarea {
    width: 100%;
    border: 1px solid #dbe2ea;
    border-radius: 16px;
    background: #ffffff;
    color: #111827;
    font-size: 15px;
    outline: none;
    transition: .18s ease;
}

.app-modal-input {
    min-height: 46px;
    padding: 10px 14px;
}

.app-modal-textarea {
    min-height: 118px;
    padding: 14px 15px;
    resize: vertical;
}

.app-modal-input:focus,
.app-modal-textarea:focus {
    border-color: #9bb7ff;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, .08);
}

.app-modal-help {
    margin-top: 8px;
    color: #7b8494;
    font-size: 13px;
    line-height: 1.35;
}

.app-modal-card {
    border: 1px solid #edf1f5;
    border-radius: 18px;
    background: #f8fafc;
}

.app-modal-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #edf1f5;
    border-radius: 18px;
    background: #ffffff;
    cursor: pointer;
    transition: .18s ease;
}

.app-modal-option:hover {
    border-color: #d7dee8;
    background: #fbfdff;
}

.app-modal-checkbox {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #cfd8e3;
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
    transition: .18s ease;
}

.app-modal-checkbox:checked {
    border-color: #1677ff;
    background: #1677ff;
}

.app-modal-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.calendar-day-tooltip {
    position: absolute;
    z-index: 1080;
    min-width: 180px;
    max-width: 280px;
    padding: 10px 12px;
    border: 1px solid #e6ebf1;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.16);
    font-size: 13px;
    line-height: 1.35;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.calendar-day-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.calendar-day-tooltip-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
}

.calendar-day-tooltip-row + .calendar-day-tooltip-row {
    margin-top: 6px;
}

.calendar-day-tooltip-comment {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid #eef2f7;
    color: #4b5563;
}

.calendar-day-tooltip-comment-title {
    margin-bottom: 3px;
    color: #8a94a6;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

@media (max-width: 576px) {
    .app-modal-header,
    .app-modal-body,
    .app-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .app-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .app-modal-actions {
        width: 100%;
    }

    .app-modal-actions .app-modal-btn,
    .app-modal-footer > .app-modal-btn {
        width: 100%;
    }
}
