/*
 * PERSEBAYT public onboarding
 * المطور: ابانوب شكري — الملكية الفكرية لشركة المتر
 */
.onboarding-shell {
    display: grid;
    gap: 18px;
}

.onboarding-shell--single {
    max-width: 1040px;
    margin-inline: auto;
}

.onboarding-intro {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid #d8e8df;
    border-radius: 20px;
    background:
        radial-gradient(circle at 95% 0, rgba(23, 114, 69, .14), transparent 42%),
        #fff;
}

.onboarding-intro__icon,
.choice-card__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: #eaf7ef;
    color: #11603a;
    font-size: 1.2rem;
}

.onboarding-intro h1 {
    margin: 0 0 5px;
    color: #123b27;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.onboarding-intro p {
    margin: 0;
    color: #5b6d62;
    line-height: 1.7;
}

.onboarding-form {
    overflow: visible;
}

.onboarding-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.onboarding-progress li {
    border: 1px solid #dbe6df;
    border-radius: 14px;
    padding: 12px;
    background: #f8fbf9;
    color: #53625a;
    font-weight: 800;
    text-align: center;
}

.onboarding-progress li.is-active {
    border-color: #177245;
    background: #eaf7ef;
    color: #11603a;
}

.role-grid,
.plan-grid,
.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
    gap: 12px;
}

.choice-card {
    position: relative;
    display: grid;
    gap: 5px;
    min-height: 132px;
    padding: 16px;
    border: 2px solid #dbe4df;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.choice-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.choice-card:hover {
    border-color: #8cbca2;
    transform: translateY(-1px);
}

.choice-card:has(input:checked) {
    border-color: #177245;
    box-shadow: 0 0 0 4px rgba(23, 114, 69, .1);
    background: #f6fcf8;
}

.choice-card input {
    position: absolute;
    inset-inline-start: 13px;
    top: 13px;
}

.field select {
    min-height: 46px;
}

.choice-card strong {
    font-size: 1.05rem;
    color: #153e2a;
}

.choice-card small,
.field-note,
.section-note {
    color: #66756d;
    line-height: 1.65;
}

.form-section {
    border: 0;
    padding: 0;
    margin: 0;
}

.form-section + .form-section {
    border-top: 1px solid #e5ebe7;
    padding-top: 22px;
    margin-top: 22px;
}

.form-section legend {
    width: 100%;
    margin-bottom: 14px;
    padding: 0;
    color: #123b27;
    font-size: 1.25rem;
    font-weight: 900;
}

.required-mark {
    color: #b42318;
}

.phone-control {
    display: grid;
    grid-template-columns: 1fr auto;
    direction: ltr;
}

.phone-control input {
    border-radius: 11px 0 0 11px !important;
    direction: ltr;
}

.phone-prefix {
    display: grid;
    place-items: center;
    min-width: 62px;
    border: 1px solid #cbd5e1;
    border-left: 0;
    border-radius: 0 11px 11px 0;
    background: #f3f6f4;
    color: #244c36;
    font-weight: 900;
}

.organization-search {
    position: relative;
}

.organization-results {
    display: none;
    position: absolute;
    z-index: 20;
    inset-inline: 0;
    top: calc(100% - 7px);
    max-height: 320px;
    overflow: auto;
    padding: 8px;
    border: 1px solid #cfddd5;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 45, 29, .15);
}

.organization-results.is-open {
    display: grid;
    gap: 7px;
}

.organization-result {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: #f7faf8;
    color: #182e22;
    text-align: right;
    cursor: pointer;
}

.organization-result:hover {
    background: #eaf7ef;
}

.organization-result small {
    color: #627369;
}

.selected-organization {
    display: none;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid #a9d1ba;
    border-radius: 12px;
    background: #f1faf5;
}

.selected-organization.is-visible {
    display: flex;
}

.selected-organization button {
    border: 0;
    background: transparent;
    color: #9b2c2c;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.check-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0;
}

.check-line input {
    width: 20px;
    height: 20px;
    margin-top: 6px;
}

.check-line a {
    color: #116b40;
    font-weight: 800;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-secondary {
    background: #eef3f0;
    color: #234535 !important;
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.secure-note,
.pending-note,
.info-strip {
    padding: 13px 15px;
    border-radius: 13px;
    background: #f0f7ff;
    color: #214d75;
}

.pending-note {
    background: #fff7e8;
    color: #7a4b00;
}

.otp-card {
    max-width: 620px;
    margin-inline: auto;
    text-align: center;
}

.otp-code {
    max-width: 300px;
    margin-inline: auto;
    direction: ltr;
    text-align: center;
    letter-spacing: .45em;
    font-size: 1.45rem !important;
    font-weight: 900;
}

.plan-price {
    font-size: 1.3rem;
    font-weight: 900;
    color: #116b40;
}

.payment-details {
    margin-top: 8px;
    white-space: pre-line;
}

.file-control {
    border: 1px dashed #9bb9a8 !important;
    background: #f8fbf9;
}

.upload-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 96px;
    margin-top: 14px;
    padding: 13px;
    border: 2px dashed #a9c8b6;
    border-radius: 18px;
    background: #f8fcfa;
    color: #193e2b;
    cursor: pointer;
    transition:
        border-color .18s ease,
        background .18s ease,
        transform .18s ease;
}

.upload-tile:hover,
.upload-tile:focus-within {
    border-color: #177245;
    background: #f0faf4;
    transform: translateY(-1px);
}

.upload-tile input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.upload-tile__preview {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    overflow: hidden;
    border-radius: 16px;
    background: #dff2e7;
    color: #11603a;
    font-size: 1.6rem;
}

.upload-tile__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-tile strong,
.upload-tile small {
    display: block;
}

.upload-tile small {
    margin-top: 5px;
    color: #66756d;
}

.application-success {
    max-width: 680px;
    margin-inline: auto;
    text-align: center;
}

.application-success__icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #e7f8ee;
    color: #0c7a42;
    font-size: 2rem;
}

.application-success .form-actions {
    justify-content: center;
}

[hidden] {
    display: none !important;
}

@media (max-width: 680px) {
    .onboarding-progress {
        grid-template-columns: 1fr;
    }

    .onboarding-progress li:not(.is-active) {
        display: none;
    }

    .plan-grid,
    .payment-grid {
        grid-template-columns: 1fr;
    }

    .role-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .choice-card {
        min-height: 116px;
        padding: 12px;
    }

    .choice-card small {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        font-size: .78rem;
    }

    .onboarding-intro {
        align-items: flex-start;
        padding: 14px;
    }

    .form-actions > * {
        flex: 1 1 100%;
        justify-content: center;
        min-height: 46px;
    }
}

@media (max-width: 360px) {
    .role-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .choice-card {
        min-width: 0;
        padding: 10px;
    }
}
