.modal-content:has(.project-wizard) {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    max-height: calc(100vh - 40px);
}

#frame_modal:has(.project-wizard) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 40px);
}

.project-wizard {
    display: flex;
    flex-direction: column;
    height: min(920px, calc(100vh - 40px));
    min-height: 0;
    background: #fff;
    color: #25313f;
}

.project-wizard-header {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid #dfe5ec;
}

.project-wizard-header h2 { 
    margin: 0;
    font-size: 30px;
    font-weight: 800;
}

.project-wizard-close {
    border: 0;
    background: transparent;
    color: #777;
    font-size: 52px;
    line-height: 1;
}

.project-wizard-shell {
    display: grid;
    grid-template-columns: 300px 1fr;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.project-wizard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 58px;
    padding: 32px;
    background: #f5f7fb;
    border-right: 1px solid #dfe5ec;
    min-height: 0;
    overflow-y: auto;
}

.project-wizard-card {
    background: #fff;
    border: 1px solid #e1e7ef;
    border-radius: 18px;
    padding: 26px;
}

.project-wizard-intro {
    min-height: 164px;
}

.project-wizard-eyebrow {
    display: flex;
    gap: 12px;
    align-items: center;
    color: #48ad64;
    font-weight: 800;
    margin-bottom: 18px;
}

.project-wizard-avatar {
    width: 68px;
    height: 68px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf2fa;
    color: #64748b;
    font-weight: 800;
    font-size: 22px;
}

.project-wizard-section-title {
    color: #617182;
    font-weight: 800;
    margin-bottom: 24px;
}

.project-wizard-progress {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-wizard-progress-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
}

.project-wizard-progress-dot {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #d4deea;
    color: #64748b;
    font-weight: 800;
    background: #fff;
}

.project-wizard-progress-item.is-active .project-wizard-progress-dot {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.project-wizard-progress-item.is-done .project-wizard-progress-dot {
    background: #52bd7b;
    color: #fff;
    border-color: #52bd7b;
}

.project-wizard-progress-label,
.project-wizard-progress-subtitle {
    display: block;
}

.project-wizard-progress-label {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
}

.project-wizard-progress-subtitle {
    color: #607386;
    font-size: 20px;
}

.project-wizard-cancel {
    margin-top: auto;
    font-size: 22px;
}

.project-wizard-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.project-wizard-main > form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.project-wizard-content {
    padding: 20px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.project-wizard-title {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 36px;
}

.project-wizard-title > span {
    font-size: 34px;
    line-height: 1.1;
}

.project-wizard-title h3 {
    margin: 0;
    font-size: 38px;
    font-weight: 850;
}

.project-wizard-title h4 {
    margin: 0;
    font-size: 30px;
    font-weight: 850;
}

.project-wizard-title p {
    margin: 8px 0 0;
    font-size: 24px;
    color: #65778a;
}

.project-wizard-title-sm {
    margin-bottom: 18px;
}

.project-wizard .form-control,
.project-wizard .form-select,
.project-wizard .input-group-text {
    border-color: #dde5ee;
    border-radius: 12px;
}

.project-wizard .form-control-lg,
.project-wizard .form-select-lg,
.project-wizard .input-group-lg > .form-control,
.project-wizard .input-group-lg > .input-group-text {
    min-height: 32px;
}

.project-wizard-textarea {
    min-height: 200px;
    font-size: 18px;
}

.project-wizard-switch {
    border: 1px solid #dde5ee;
    border-radius: 18px;
    padding: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-wizard-switch .form-check-input {
    width: 48px;
    height: 28px;
}

.project-upload-zone {
    min-height: 340px;
    border: 2px dashed #c9d7eb;
    border-radius: 18px;
    background: #fbfcff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    cursor: pointer;
}

.project-upload-zone.is-invalid {
    border-color: var(--bs-danger);
}

.project-upload-icon,
.project-choice-icon {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4d7cff;
    font-size: 38px;
}

.project-upload-title {
    font-size: 24px;
}

.project-upload-link {
    font-size: 22px;
    color: #25313f;
    text-decoration: underline;
}

.project-upload-name {
    color: #607386;
    font-size: 20px;
}

.project-wizard-advice {
    border: 1px solid #f6d673;
    border-radius: 18px;
    padding: 28px;
}

.project-import-panel {
    background: #f6f7f9;
    border-radius: 20px;
    padding: 28px;
}

.project-import-panel h4 {
    font-size: 30px;
    font-weight: 850;
    margin-bottom: 26px;
}

.project-choice-card {
    min-height: 290px;
    border: 2px solid #dde5ee;
    border-radius: 18px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    cursor: pointer;
    text-align: center;
}

.project-choice-card.is-selected {
    border-color: #4d7cff;
    box-shadow: 0 0 0 3px rgba(77, 124, 255, .14);
}

.project-choice-card strong {
    font-size: 28px;
    color: #000;
}

.project-choice-card span:last-child {
    font-size: 22px;
    color: #607386;
}

.project-choice-icon-purple {
    background: #efe7ff;
    color: #7c4dff;
}

.project-choice-icon-green {
    background: #effdf4;
    color: #49ad62;
}

.project-import-check {
    min-height: 70px;
    border: 1px solid #dde5ee;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    font-size: 22px;
    color: #8a97a6;
}

.project-import-check input {
    width: 24px;
    height: 24px;
}

.project-wizard-footer {
    min-height: 86px;
    border-top: 1px solid #dfe5ec;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 36px;
}

.project-wizard-next {
    background: #50b976;
    border: 0;
    color: #fff;
    border-radius: 12px;
    padding: 16px 30px;
    font-weight: 800;
}

.text-purple {
    color: #7c4dff;
}

@media (max-width: 992px) {
    .project-wizard-shell {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .project-wizard-sidebar {
        gap: 20px;
        overflow: visible;
    }

    .project-wizard-progress {
        gap: 16px;
    }
}
