/* ── Portal de Afiliadas ────────────────────────────────────────────────────── */

/* Auth cards (register / login) */
.portal-auth-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: #faf9f7;
}

.portal-auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 440px;
}

.portal-auth-logo {
    text-align: center;
    margin-bottom: 1.6rem;
}

.portal-auth-logo img {
    height: 52px;
    object-fit: contain;
}

.portal-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 .3rem;
    font-family: 'Poppins', sans-serif;
}

.portal-auth-subtitle {
    font-size: .88rem;
    color: #6b7280;
    text-align: center;
    margin: 0 0 1.8rem;
    font-family: 'Poppins', sans-serif;
}

.portal-form-group {
    margin-bottom: 1rem;
}

.portal-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .35rem;
    font-family: 'Poppins', sans-serif;
}

.portal-input {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: .9rem;
    font-family: 'Poppins', sans-serif;
    color: #111;
    background: #fafafa;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.portal-input:focus {
    outline: none;
    border-color: #D9593C;
    box-shadow: 0 0 0 3px rgba(217,89,60,.1);
    background: #fff;
}

.portal-input::placeholder { color: #9ca3af; }

.portal-password-wrap { position: relative; }
.portal-password-wrap .portal-input { padding-right: 2.6rem; }
.portal-password-toggle {
    position: absolute;
    top: 50%;
    right: .65rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: color .2s;
}
.portal-password-toggle:hover { color: #D9593C; }
.portal-password-toggle svg { width: 20px; height: 20px; }

.portal-btn {
    display: block;
    width: 100%;
    padding: .75rem 1rem;
    background: #D9593C;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin-top: 1.2rem;
}

.portal-btn:hover:not(:disabled) { background: #c44e33; }
.portal-btn:active:not(:disabled) { transform: scale(.98); }
.portal-btn:disabled { opacity: .6; cursor: not-allowed; }

.portal-btn-secondary {
    background: transparent;
    color: #D9593C;
    border: 1.5px solid #D9593C;
}
.portal-btn-secondary:hover:not(:disabled) { background: rgba(217,89,60,.06); }

.portal-link-row {
    text-align: center;
    margin-top: 1.2rem;
    font-size: .85rem;
    color: #6b7280;
    font-family: 'Poppins', sans-serif;
}

.portal-link-row a {
    color: #D9593C;
    font-weight: 600;
    text-decoration: none;
    margin-left: .3rem;
}

.portal-link-row a:hover { text-decoration: underline; }

.portal-forgot-link {
    font-size: .75rem;
    font-weight: 600;
    color: #D9593C;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    transition: opacity .15s;
}

.portal-forgot-link:hover { opacity: .75; }

.portal-alert {
    padding: .7rem 1rem;
    border-radius: 8px;
    font-size: .85rem;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1rem;
}

.portal-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.portal-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.portal-alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ── Portal Dashboard ─────────────────────────────────────────────────────── */

.portal-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
    font-family: 'Poppins', sans-serif;
}

@media (max-width: 768px) {
    .portal-shell {
        grid-template-columns: 1fr;
        padding: 1.5rem 1rem 3rem;
    }
}

/* Sidebar */
.portal-sidebar {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.portal-sidebar-header {
    background: linear-gradient(135deg, #D9593C 0%, #c44e33 100%);
    padding: 1.5rem 1.2rem;
    text-align: center;
}

.portal-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.4);
    margin: 0 auto .6rem;
    display: block;
}

.portal-avatar-initials {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 auto .6rem;
    border: 3px solid rgba(255,255,255,.4);
}

.portal-sidebar-name {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 .15rem;
}

.portal-sidebar-role {
    color: rgba(255,255,255,.8);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.portal-sidebar-nav {
    padding: .6rem 0;
}

.portal-nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem 1.2rem;
    color: #374151;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    transition: background .15s, color .15s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.portal-nav-link:hover { background: #fef3f0; color: #D9593C; }
.portal-nav-link.active { background: #fef3f0; color: #D9593C; font-weight: 600; }

.portal-nav-link svg { width: 17px; height: 17px; flex-shrink: 0; }

.portal-nav-divider {
    border: none;
    border-top: 1px solid #f3f4f6;
    margin: .4rem 0;
}

/* Main content */
.portal-content {
    min-width: 0;
}

.portal-content-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.portal-content-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1.4rem;
    padding-bottom: .8rem;
    border-bottom: 2px solid #f3f4f6;
}

.portal-profile-photo-row {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.6rem;
    flex-wrap: wrap;
}

.portal-profile-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f3f4f6;
    flex-shrink: 0;
}

.portal-profile-initials {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #D9593C;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.portal-textarea {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: .9rem;
    font-family: 'Poppins', sans-serif;
    color: #111;
    background: #fafafa;
    resize: vertical;
    min-height: 90px;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}

.portal-textarea:focus {
    outline: none;
    border-color: #D9593C;
    box-shadow: 0 0 0 3px rgba(217,89,60,.1);
    background: #fff;
}

.portal-read-field {
    padding: .65rem .9rem;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: .9rem;
    color: #6b7280;
    font-family: 'Poppins', sans-serif;
}

.portal-actions {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
    margin-top: 1.4rem;
}

.portal-btn-sm {
    padding: .5rem 1.2rem;
    font-size: .85rem;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .2s, transform .1s;
}

.portal-btn-sm:active { transform: scale(.97); }
.portal-btn-sm:disabled { opacity: .6; cursor: not-allowed; }

.portal-btn-primary-sm {
    background: #D9593C;
    color: #fff;
}
.portal-btn-primary-sm:hover:not(:disabled) { background: #c44e33; }

.portal-btn-outline-sm {
    background: transparent;
    color: #D9593C;
    border: 1.5px solid #D9593C;
}
.portal-btn-outline-sm:hover:not(:disabled) { background: rgba(217,89,60,.06); }

.portal-file-label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1rem;
    border: 1.5px dashed #D9593C;
    border-radius: 8px;
    color: #D9593C;
    font-size: .82rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background .15s;
}

.portal-file-label:hover { background: rgba(217,89,60,.05); }
