@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Portal independiente: los selectores no alcanzan el header ni el footer públicos. */
.af-portal,
.af-portal *,
.af-portal *::before,
.af-portal *::after {
    box-sizing: border-box;
}

.af-portal {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: #f7f8fa;
    color: #252a33;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    line-height: 1.6;
}

.af-portal a {
    color: #d84534;
}
.af-portal button, .af-portal input, .af-portal select, .af-portal textarea {
    font-family: inherit;
}

.af-portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 64px;
    padding: 12px max(18px, calc((100vw - 1060px) / 2));
    border-bottom: 1px solid #e9edf0;
    background: #fff;
}

.af-portal-header a {
    color: #586473;
    font-size: 12px;
    text-decoration: none;
}

.af-portal-header a:first-child {
    color: #252a33;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.04em;
    white-space: nowrap;
}

.af-portal-header strong {
    font-weight: 700;
}
.af-portal-header span {
    margin-left: 4px;
    color: #ff4b39;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
}

.af-portal-header a:hover, .af-portal-header a:focus-visible {
    color: #d84534;
}
.af-portal-header form {
    margin: 0;
}
.af-text-button {
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: #586473;
    font-size: 12px;
    cursor: pointer;
}

.af-portal-main {
    width: min(1060px, calc(100% - 36px));
    margin: 30px auto 70px;
}
.af-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: #e34432;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.af-portal h1 {
    margin: 0 0 9px;
    color: #252a33;
    font-size: clamp(25px, 3vw, 31px);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.24;
}

.af-portal h2 {
    margin: 0 0 9px;
    color: #252a33;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}
.af-portal p {
    color: #697481;
    font-size: 12px;
    line-height: 1.65;
}

/* Solicitud: título sobre un formulario centrado. */
.af-form-wrap {
    width: min(700px, calc(100% - 36px));
    margin: 42px auto 70px;
}

.af-form-intro {
    max-width: 620px;
    margin: 0 auto 25px;
    text-align: center;
}
.af-form-intro p {
    max-width: 540px;
    margin: 0 auto;
}

.af-form-card,
.af-auth-card,
.af-card,
.af-panel-section,
.af-material {
    border: 1px solid #e6e9ed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(30, 42, 54, .03);
}

.af-form-card {
    padding: 27px 30px;
}
.af-auth-card {
    width: min(430px, 100%);
    margin: 55px auto 70px;
    padding: 30px;
}
.af-auth-card > p {
    margin: 0 0 21px;
}
.af-auth-card > a {
    display: inline-block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}
.af-auth-links {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-top: 14px;
    color: #697481;
    font-size: 11px;
}
.af-auth-links a {
    font-weight: 600;
    text-decoration: none;
}

.af-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    margin-bottom: 14px;
}
.af-field label {
    color: #424c59;
    font-size: 11px;
    font-weight: 600;
}
.af-field input,
.af-field select,
.af-field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid #dce2e8;
    border-radius: 5px;
    background: #fff;
    color: #252a33;
    font-size: 12px;
    line-height: 1.5;
}

.af-field textarea {
    min-height: 102px;
    resize: vertical;
}
.af-field input:focus, .af-field select:focus, .af-field textarea:focus {
    border-color: #ff9b90;
    outline: 2px solid rgba(255, 75, 57, .18);
}

.af-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}
.af-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 15px 0;
    color: #66717d;
    font-size: 11px;
    line-height: 1.55;
}
.af-check input {
    flex: 0 0 auto;
    margin: 2px 0 0;
}
.af-honeypot {
    position: absolute;
    left: -9999px;
}
.af-error, .af-notice {
    margin: 0 0 17px;
    padding: 12px 13px;
    border: 1px solid #f0d1cc;
    border-radius: 5px;
    background: #fff1ef;
    color: #a7382c;
    font-size: 12px;
    line-height: 1.5;
}
.af-notice {
    border-color: #cce9d6;
    background: #edf9f1;
    color: #267048;
}

.af-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 17px;
    border: 1px solid #ff4b39;
    border-radius: 5px;
    background: #ff4b39;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
}

.af-button:hover, .af-button:focus-visible {
    border-color: #e63e2d;
    background: #e63e2d;
}
.af-button:disabled {
    cursor: not-allowed;
    opacity: .55;
}
.af-auth-card .af-button {
    width: 100%;
}
.af-portal .g-recaptcha {
    max-width: 100%;
    margin: 3px 0 16px;
}

/* El control de visibilidad no cambia name, value ni validación de los campos. */
.af-password-control {
    position: relative;
    width: 100%;
}
.af-password-control input {
    padding-right: 47px;
}
.af-password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #687481;
    cursor: pointer;
}

.af-password-toggle:hover, .af-password-toggle:focus-visible {
    background: #f2f4f6;
    color: #d84534;
}
.af-password-toggle:focus-visible {
    outline: 2px solid #ff9b90;
}
.af-password-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.af-password-toggle .af-eye-off {
    display: none;
}
.af-password-toggle[aria-pressed='true'] .af-eye {
    display: none;
}
.af-password-toggle[aria-pressed='true'] .af-eye-off {
    display: block;
}

/* Panel, finanzas y perfil. */
.af-dashboard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 17px;
}
.af-dashboard-head p {
    margin: 0;
}
.af-account-code {
    padding: 8px 11px;
    border: 1px solid #f0d9d5;
    border-radius: 5px;
    background: #fff8f6;
    color: #c94232;
    font-size: 10px;
    font-weight: 700;
}
.af-subnav {
    display: flex;
    gap: 4px;
    margin: 14px 0 20px;
    overflow-x: auto;
    border-bottom: 1px solid #e1e5e9;
}
.af-subnav a {
    flex: none;
    padding: 10px 13px;
    border-bottom: 2px solid transparent;
    color: #64707d;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}
.af-subnav a[aria-current='page'] {
    border-bottom-color: #ff4b39;
    color: #c94232;
}
.af-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.af-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 17px;
    color: #5c6774;
    font-size: 11px;
}
.af-card strong {
    color: #252a33;
    font-size: 22px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.af-card small, .af-material small {
    color: #84909c;
    font-size: 10px;
    line-height: 1.5;
}
.af-link-coral {
    color: #e34432 !important;
    text-decoration: none;
}
.af-link-coral:hover, .af-link-coral:focus-visible {
    color: #c43a2b !important;
    text-decoration: underline;
}
.af-panel-section {
    min-width: 0;
    margin-top: 16px;
    padding: 22px;
}
.af-panel-section p {
    margin: 0 0 16px;
}
.af-panel-heading {
    margin-bottom: 12px;
}
.af-link-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
    align-items: end;
}
.af-link-form .af-button {
    margin-bottom: 14px;
}
.af-generated {
    min-width: 0;
    margin-top: 17px;
    padding: 14px;
    border-radius: 5px;
    background: #fff5f3;
}
.af-generated label {
    display: block;
    margin-bottom: 7px;
    color: #7a4a44;
    font-size: 11px;
    font-weight: 600;
}
.af-generated input {
    width: 100%;
    min-width: 0;
    padding: 10px;
    border: 1px solid #f2c6bf;
    border-radius: 5px;
    background: #fff;
    color: #596572;
    font-size: 11px;
}
.af-materials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.af-material {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    padding: 15px;
    font-size: 11px;
}
.af-material strong {
    color: #252a33;
    font-size: 16px;
}
.af-material a {
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}
.af-material textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #e4e8ec;
    border-radius: 5px;
    background: #fafbfc;
    color: #687481;
    font-size: 10px;
    resize: vertical;
}
.af-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.af-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    text-align: left;
}
.af-table th, .af-table td {
    padding: 10px;
    border-bottom: 1px solid #edf0f2;
    font-size: 11px;
    vertical-align: top;
}
.af-table th {
    color: #7b8591;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.af-table td {
    color: #56616e;
}
.af-disclaimer {
    margin-top: 12px !important;
    font-size: 11px !important;
}
.af-payment-form {
    max-width: 700px;
}
.af-bank-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}
.af-bank-fields[hidden], .af-portal [data-af-paypal][hidden] {
    display: none;
}
.af-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
    gap: 16px;
    align-items: start;
}
.af-profile-grid .af-panel-section {
    margin-top: 0;
    margin-bottom: 16px;
}

@media (max-width: 760px) {
    .af-portal-header {
        padding-inline: 15px;
    }
    .af-portal-main {
        width: min(100% - 30px, 580px);
        margin: 20px auto 55px;
    }
    .af-form-wrap {
        width: min(100% - 30px, 580px);
        margin: 25px auto 55px;
    }
    .af-form-intro {
        margin-bottom: 21px;
    }
    .af-auth-card {
        margin: 25px auto;
    }
    .af-form-card, .af-auth-card, .af-panel-section {
        padding: 18px;
    }
    .af-row, .af-stats, .af-link-form, .af-bank-fields, .af-profile-grid {
        grid-template-columns: 1fr;
    }
    .af-row {
        gap: 0;
    }
    .af-subnav {
        margin-top: 14px;
    }
    .af-field input, .af-field select, .af-field textarea {
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .af-portal .g-recaptcha {
        transform: scale(.82);
        transform-origin: left top;
        margin-bottom: 2px;
    }
}
