:root {
    --wib-purple: #4b0082;
    --wib-deep-purple: #321447;
    --wib-lilac: #b9a0d8;
    --wib-light-lilac: #eee7f7;
    --wib-soft-purple: #f7f2fb;
    --wib-gold: #c9a227;
    --wib-white: #ffffff;
    --wib-text: #28232d;
    --wib-muted: #766d7c;
    --wib-border: rgba(75, 0, 130, 0.12);
    --wib-shadow: 0 18px 50px rgba(50, 20, 71, 0.09);
    --wib-glow: 0 0 35px rgba(185, 160, 216, 0.18);
}

.wib-portal,
.wib-portal * {
    box-sizing: border-box;
}

.wib-portal {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    color: var(--wib-text);
    font-family: "Poppins", Arial, sans-serif;
}

.wib-portal-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding: 58px;
    border-radius: 28px;
    background:
        linear-gradient(
            135deg,
            #321447 0%,
            #4b0082 60%,
            #674092 100%
        );
    color: #ffffff;
    box-shadow: var(--wib-shadow);
    position: relative;
    overflow: hidden;
}

.wib-portal-hero::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -120px;
    top: -150px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.13);
    box-shadow:
        0 0 0 45px rgba(255,255,255,0.025),
        0 0 0 90px rgba(255,255,255,0.018);
}

.wib-hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.wib-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.wib-portal-hero .wib-eyebrow {
    color: #d9c9e9;
}

.wib-portal-hero h1 {
    margin: 0 0 15px;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(38px, 5vw, 64px);
    font-weight: 500;
    line-height: 1.04;
}

.wib-portal-hero p {
    margin: 0;
    max-width: 650px;
    color: rgba(255,255,255,0.82);
    font-size: 16px;
    line-height: 1.75;
}

.wib-hero-actions {
    position: relative;
    z-index: 2;
}

.wib-logout-link {
    display: inline-block;
    padding: 11px 20px;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
}

.wib-logout-link:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}

.wib-member-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin: 20px 0;
    padding: 20px 26px;
    background: #ffffff;
    border: 1px solid var(--wib-border);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(50,20,71,0.04);
}

.wib-small-label {
    display: block;
    margin-bottom: 5px;
    color: var(--wib-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.wib-member-bar strong {
    display: block;
    color: var(--wib-deep-purple);
    font-size: 15px;
    font-weight: 600;
}

.wib-member-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--wib-muted);
    font-size: 12px;
}

.wib-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6d9c7b;
}

.wib-progress-card {
    margin-bottom: 25px;
    padding: 32px;
    border: 1px solid var(--wib-border);
    border-radius: 22px;
    background: var(--wib-soft-purple);
    box-shadow: var(--wib-glow);
}

.wib-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.wib-progress-top h2 {
    margin: 0;
    color: var(--wib-deep-purple);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-weight: 500;
}

.wib-progress-number {
    color: var(--wib-purple);
    font-size: 28px;
    font-weight: 700;
}

.wib-progress-track {
    width: 100%;
    height: 7px;
    margin: 25px 0 24px;
    overflow: hidden;
    border-radius: 999px;
    background: #ded4e8;
}

.wib-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--wib-purple),
        var(--wib-lilac)
    );
    transition: width 0.5s ease;
}

.wib-progress-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wib-progress-steps > div {
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--wib-muted);
}

.wib-progress-steps > div.is-current,
.wib-progress-steps > div.is-complete {
    color: var(--wib-deep-purple);
}

.wib-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid #d5c8df;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.wib-progress-steps .is-complete .wib-step-number {
    border-color: var(--wib-purple);
    background: var(--wib-purple);
    color: #ffffff;
}

.wib-progress-steps strong {
    display: block;
    font-size: 13px;
}

.wib-progress-steps small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
}

.wib-portal-message {
    display: none;
    margin: 0 0 24px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.wib-portal-message.is-success {
    border: 1px solid rgba(63, 120, 82, 0.18);
    background: #f1f8f3;
    color: #315e40;
}

.wib-portal-message.is-error {
    border: 1px solid rgba(160, 60, 60, 0.18);
    background: #fff4f4;
    color: #8b3434;
}

.wib-checkin-card {
    margin-bottom: 25px;
    padding: 42px;
    background: #ffffff;
    border: 1px solid var(--wib-border);
    border-radius: 22px;
    box-shadow: var(--wib-shadow);
}

.wib-card-heading {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 22px;
    margin-bottom: 35px;
}

.wib-card-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--wib-light-lilac);
    color: var(--wib-purple);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
}

.wib-card-heading .wib-eyebrow {
    color: var(--wib-purple);
}

.wib-card-heading h2 {
    margin: 0 0 10px;
    color: var(--wib-deep-purple);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 500;
    line-height: 1.1;
}

.wib-card-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--wib-muted);
    font-size: 14px;
    line-height: 1.8;
}

.wib-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.wib-form-field {
    display: flex;
    flex-direction: column;
}

.wib-form-field.wib-full {
    grid-column: 1 / -1;
}

.wib-form-field label {
    margin-bottom: 9px;
    color: var(--wib-deep-purple);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.wib-form-field textarea {
    width: 100%;
    min-height: 135px;
    resize: vertical;
    padding: 15px 17px;
    border: 1px solid #ddd5e4;
    border-radius: 12px;
    background: #ffffff;
    color: var(--wib-text);
    font-family: "Poppins", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.7;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.wib-form-field textarea::placeholder {
    color: #aaa2ad;
    opacity: 1;
}

.wib-form-field textarea:focus {
    border-color: var(--wib-lilac);
    box-shadow: 0 0 0 4px rgba(185,160,216,0.14);
}

.wib-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee9f1;
}

.wib-form-footer p {
    max-width: 620px;
    margin: 0;
    color: var(--wib-muted);
    font-size: 11px;
    line-height: 1.7;
}

.wib-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--wib-purple);
    color: #ffffff;
    font-family: "Poppins", Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.wib-primary-button:hover {
    background: var(--wib-deep-purple);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(75,0,130,0.18);
}

.wib-primary-button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
    box-shadow: none;
}

.wib-primary-button.is-loading {
    opacity: 0.7;
}

.wib-next-step-card {
    margin-top: 30px;
    padding: 48px;
    text-align: center;
    border: 1px solid rgba(201,162,39,0.2);
    border-radius: 22px;
    background:
        linear-gradient(
            135deg,
            #fbf8fd,
            #f3edf8
        );
}

.wib-next-step-card .wib-eyebrow {
    color: var(--wib-gold);
}

.wib-next-step-card h2 {
    margin: 0 0 10px;
    color: var(--wib-deep-purple);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    font-weight: 500;
}

.wib-next-step-card p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--wib-muted);
    font-size: 14px;
    line-height: 1.8;
}

.wib-login-prompt {
    max-width: 650px;
    margin: 60px auto;
    padding: 55px 45px;
    text-align: center;
    border: 1px solid var(--wib-border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--wib-shadow);
}

.wib-login-prompt .wib-eyebrow {
    color: var(--wib-purple);
}

.wib-login-prompt h2 {
    margin: 0 0 15px;
    color: var(--wib-deep-purple);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    font-weight: 500;
}

.wib-login-prompt p {
    margin: 0 auto 28px;
    color: var(--wib-muted);
    font-size: 14px;
    line-height: 1.8;
}

@media (max-width: 800px) {

    .wib-portal {
        padding: 25px 14px 60px;
    }

    .wib-portal-hero {
        display: block;
        padding: 38px 28px;
    }

    .wib-hero-actions {
        margin-top: 25px;
    }

    .wib-member-bar {
        display: block;
    }

    .wib-member-status {
        margin-top: 15px;
    }

    .wib-progress-card,
    .wib-checkin-card {
        padding: 28px 22px;
    }

    .wib-progress-steps {
        grid-template-columns: 1fr;
    }

    .wib-form-grid {
        grid-template-columns: 1fr;
    }

    .wib-form-field.wib-full {
        grid-column: auto;
    }

    .wib-form-footer {
        display: block;
    }

    .wib-form-footer p {
        margin-bottom: 20px;
    }

    .wib-primary-button {
        width: 100%;
    }

    .wib-card-heading {
        grid-template-columns: 48px 1fr;
        gap: 15px;
    }

    .wib-card-number {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }
}

@media (max-width: 520px) {

    .wib-portal-hero h1 {
        font-size: 38px;
    }

    .wib-card-heading h2 {
        font-size: 29px;
    }

    .wib-progress-top h2 {
        font-size: 24px;
    }

    .wib-progress-number {
        font-size: 23px;
    }

    .wib-next-step-card {
        padding: 35px 22px;
    }
}