.lead-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(8, 13, 25, 0.68);
    backdrop-filter: blur(10px);
}

.lead-modal.is-open {
    display: flex;
}

.lead-dialog {
    width: min(560px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 26px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.26);
}

.lead-dialog__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 24px 18px;
    border-bottom: 1px solid #e2e8f0;
    background:
        radial-gradient(circle at top left, rgba(37, 211, 102, 0.16), transparent 38%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.lead-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #047857;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lead-kicker span {
    width: 9px;
    height: 9px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.14);
}

.lead-dialog__head h2 {
    margin: 0 0 6px;
    color: #0f172a;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 28px;
    line-height: 1.1;
}

.lead-dialog__head p {
    margin: 0;
    color: #64748b;
}

.lead-channel-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.lead-channel-row span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 0 11px;
    color: #0f172a;
    background: #fff;
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.lead-channel-row .fa-whatsapp {
    color: #25d366;
}

.lead-channel-row .fa-comment-sms {
    color: #2563eb;
}

.lead-close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    color: #0f172a;
    background: #f1f5f9;
    border: 0;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
}

.lead-form {
    display: grid;
    gap: 14px;
    padding: 20px 24px 24px;
}

.lead-flow {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.lead-flow div {
    display: grid;
    place-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: #f8fafc;
    text-align: center;
}

.lead-flow strong {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #0f9f65);
    border-radius: 50%;
    font-size: 13px;
}

.lead-flow span {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.lead-form label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.lead-form textarea,
.lead-form input {
    width: 100%;
    min-height: 48px;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    color: #0f172a;
    font: inherit;
    text-transform: none;
    letter-spacing: 0;
}

.lead-form textarea {
    min-height: 122px;
    resize: vertical;
}

.lead-submit,
.lead-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #16c079, #0e8a56);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(16, 185, 129, 0.28);
}

.lead-submit:disabled {
    cursor: wait;
    opacity: 0.78;
}

.lead-phone {
    display: none;
    background: linear-gradient(135deg, #0f172a, #334155);
}

.lead-phone.is-visible {
    display: inline-flex;
}

.lead-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: -2px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.lead-status {
    display: none;
    padding: 13px 14px;
    border-radius: 14px;
    background: #ecfdf5;
    color: #065f46;
    font-weight: 700;
}

.lead-status.is-error {
    background: #fee2e2;
    color: #991b1b;
}

.lead-status.is-visible {
    display: block;
}

@media (max-width: 560px) {
    .lead-modal {
        align-items: flex-end;
        justify-content: stretch;
        padding: 10px;
        background: rgba(8, 13, 25, 0.72);
    }

    .lead-dialog {
        width: 100%;
        max-height: calc(100dvh - 20px);
        border-radius: 24px 24px 18px 18px;
        box-shadow: 0 -16px 60px rgba(0, 0, 0, 0.28);
    }

    .lead-dialog__head {
        gap: 12px;
        padding: 18px 16px 14px;
    }

    .lead-kicker {
        margin-bottom: 6px;
        font-size: 10px;
        letter-spacing: 0.08em;
    }

    .lead-dialog__head h2 {
        margin-bottom: 5px;
        font-size: 23px;
    }

    .lead-dialog__head p {
        font-size: 13px;
        line-height: 1.45;
    }

    .lead-close {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }

    .lead-channel-row {
        gap: 6px;
        margin-top: 11px;
    }

    .lead-channel-row span {
        min-height: 28px;
        padding: 0 9px;
        font-size: 11px;
    }

    .lead-flow {
        grid-template-columns: repeat(3, 1fr);
    }

    .lead-flow div {
        gap: 4px;
        padding: 9px 4px;
    }

    .lead-flow strong {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .lead-flow span {
        font-size: 10px;
        line-height: 1.15;
    }

    .lead-form {
        gap: 10px;
        padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    }

    .lead-form label {
        gap: 6px;
        font-size: 11px;
        letter-spacing: 0.07em;
    }

    .lead-form textarea,
    .lead-form input {
        min-height: 44px;
        padding: 11px 12px;
        border-radius: 13px;
        font-size: 15px;
    }

    .lead-form textarea {
        min-height: 92px;
    }

    .lead-submit,
    .lead-phone {
        min-height: 48px;
        font-size: 15px;
    }

    .lead-note {
        font-size: 11px;
        line-height: 1.35;
    }
}

@media (max-width: 380px) {
    .lead-channel-row span {
        font-size: 10px;
    }

    .lead-dialog__head h2 {
        font-size: 21px;
    }

    .lead-dialog__head p {
        font-size: 12px;
    }
}
