.auth-flow {
    width: min(100%, 720px);
    min-width: min(100%, 360px);
    display: grid;
    gap: 14px;
    text-align: left;
}

.auth-flow__tab {
    display: none;
}

.auth-flow__panel {
    margin: 0;
    padding: 0;
    border: 1px solid #eadfca;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(57, 41, 14, 0.08);
    overflow: hidden;
}

.auth-flow__header {
    background:
        radial-gradient(540px 160px at 0% 0%, #fff4e6 0%, rgba(255, 244, 230, 0) 70%),
        linear-gradient(120deg, #ffffff 0%, #fffbf3 100%);
    border-bottom: 1px solid #efe2cb;
    padding: 14px 16px;
}

.auth-flow__eyebrow {
    display: inline-flex;
    align-items: center;
    border: 1px solid #f0d9aa;
    background: #fff4dc;
    border-radius: 999px;
    color: #8b5f1b;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 4px 9px;
    margin: 0 0 8px;
}

.auth-flow__title {
    margin: 0;
    color: #2f2f2f;
    font-size: 1.45rem;
    line-height: 1.15;
}

.auth-flow__subtitle {
    margin: 6px 0 0;
    color: #5c574d;
    line-height: 1.35;
}

.auth-flow__body {
    padding: 20px 16px 20px;
}

.auth-flow__helper {
    margin-top: 10px;
    color: #5d574b;
    line-height: 1.35;
}

.auth-flow__assist-group {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #dccdb2;
    display: grid;
    gap: 14px;
    position: relative;
}

.auth-flow__assist-group::before {
    content: 'Altres opcions';
    position: absolute;
    top: -11px;
    left: 0;
    background: #fff;
    padding: 0 8px 0 0;
    font-size: 0.72rem;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8b7d64;
    font-weight: 600;
}

.auth-flow .auth-form > .auth-flow__feedback:first-of-type {
    margin-top: 22px;
}

.auth-flow__feedback + .auth-form__menu {
    margin-top: 10px;
}

.auth-form__menu + .auth-flow__assist-group {
    margin-top: 34px;
}

.auth-flow__body .auth-form + .auth-flow__assist-group {
    margin-top: 34px;
}

.auth-flow__assist-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-decoration: none;
    border: 1px solid #e2d5be;
    border-radius: 10px;
    background: #fffcf6;
    color: #513f2f;
    font-weight: 700;
    padding: 12px 14px;
    min-height: 46px;
}

.auth-flow__assist-link:hover {
    background: #fff6e7;
    text-decoration: none;
}

.auth-flow__assist-link--primary {
    border-color: #d32f2f;
    background: #fff5f5;
    color: #8f1f1f;
}

.auth-flow__assist-link::after {
    content: '›';
    font-size: 1.2rem;
    line-height: 1;
}

.auth-flow__helper a {
    font-weight: 700;
}

.auth-flow__helper a:focus-visible {
    outline: 2px solid #b71c1c;
    outline-offset: 2px;
    border-radius: 3px;
}

.auth-flow__error {
    margin: 10px 0;
    min-height: 20px;
    color: rgb(var(--color-txt-err));
}

.auth-flow__feedback {
    position: relative;
    border-radius: 10px;
    padding: 12px 12px 12px 44px;
    border: 1px solid #e8dcc6;
    background: #fffcf6;
    color: #5a5448;
}

.auth-flow .auth-form > .auth-flow__feedback {
    border-radius: 11px;
}

.auth-flow__feedback::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 10px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
}

.auth-flow__feedback--success {
    border-color: #b7dfc1;
    background: #eef9f0;
    color: #245a34;
    box-shadow: inset 4px 0 0 #2d8a47;
}

.auth-flow__feedback--success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%232d8a47' stroke-width='1.8'/%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%232d8a47' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.auth-flow__feedback--error {
    border-color: #e7b8b8;
    background: #fff2f2;
    color: #7e2525;
    box-shadow: inset 4px 0 0 #b73333;
}

.auth-flow__feedback--error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%23b73333' stroke-width='1.8'/%3E%3Cpath d='M12 7v6' fill='none' stroke='%23b73333' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.8' r='1.2' fill='%23b73333'/%3E%3C/svg%3E");
}

.auth-flow__feedback--guide {
    border-color: #8cb8e8;
    background: #eef6ff;
    color: #18406b;
    box-shadow: inset 4px 0 0 #2f6fb3;
}

.auth-flow__feedback--guide::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%232f6fb3' stroke-width='1.8'/%3E%3Cpath d='M12 10.3v6' fill='none' stroke='%232f6fb3' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='7.2' r='1.1' fill='%232f6fb3'/%3E%3C/svg%3E");
}

.auth-flow__result {
    border: 1px solid #d7e8dc;
    background: #f1fbf3;
    border-radius: 10px;
    padding: 12px;
}

.auth-flow__result + .auth-form {
    margin-top: 14px;
}

.auth-flow__result--error {
    border-color: #e7b8b8;
    background: #fff2f2;
}

.auth-flow__result-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
}

.auth-flow__result-icon {
    width: 30px;
    height: 30px;
    color: #2d8a47;
    flex: 0 0 auto;
}

.auth-flow__result--error .auth-flow__result-icon {
    color: #b73333;
}

.auth-flow__result-title {
    margin: 0;
    font-size: 1.05rem;
    color: #2f2f2f;
}

.auth-flow__steps {
    margin: 8px 0 0;
    padding-left: 20px;
    display: grid;
    gap: 6px;
}

.auth-flow__recover-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.auth-flow .usr-Recover input.auth-recover-option__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-flow .usr-Recover label.auth-recover-option {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    border: 1px solid #e7dcc6;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    cursor: pointer;
    width: 80%;
    margin: 0 auto;
    min-height: 48px;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-recover-option__mail {
    font-weight: 700;
    color: #2f2f2f;
}

.auth-recover-option__name {
    color: #6b6254;
}

.auth-recover-option__input:checked + .auth-recover-option {
    border-color: #8f1f1f;
    background: #fde8e8;
    box-shadow: 0 0 0 3px rgba(143, 31, 31, 0.3);
}

.auth-recover-option__input:checked + .auth-recover-option .auth-recover-option__mail {
    color: #651313;
}

.auth-recover-option__input:focus-visible + .auth-recover-option {
    outline: 2px solid #b71c1c;
    outline-offset: 2px;
}

.auth-flow__recover-table td {
    padding: 0;
}

.auth-flow__recover-table .opt td {
    text-align: center;
}

.auth-flow__recover-table .opt {
    border-bottom: 0;
}

.auth-flow__notice {
    border: 1px dashed #d9ccb3;
    border-radius: 10px;
    background: #fffcf6;
    color: #5a5448;
    padding: 10px;
    line-height: 1.4;
    margin-top: 10px;
}

.auth-flow__consent-copy {
    line-height: 1.4;
}

.auth-flow__consent-copy p {
    margin: 0 0 10px;
}

@media (max-width: 680px) {
    .auth-flow__title {
        font-size: 1.25rem;
    }

    .auth-flow__body,
    .auth-flow__header {
        padding-left: 12px;
        padding-right: 12px;
    }

    .auth-flow .usr-Recover label.auth-recover-option {
        width: 92%;
    }

    .auth-flow .auth-form > .auth-flow__feedback:first-of-type {
        margin-top: 16px;
    }

    .auth-flow__feedback + .auth-form__menu {
        margin-top: 10px;
    }

    .auth-form__menu + .auth-flow__assist-group,
    .auth-flow__body .auth-form + .auth-flow__assist-group {
        margin-top: 20px;
    }

    .auth-flow__assist-group {
        margin-top: 22px;
        padding-top: 14px;
        gap: 10px;
    }

    .auth-flow {
        width: 100%;
        min-width: 0;
    }
}
