/*
 * Entrada pública progressiva do Portal do Filiado.
 * Escopo exclusivo: .portal-entry-page
 */

:root {
    --entry-accent: #d71920;
    --entry-accent-dark: #ad1117;
    --entry-ink: #101a35;
    --entry-muted: #526681;
    --entry-border: #dce3eb;
    --entry-surface: #ffffff;
    --entry-background: #f1f3f5;
    --entry-success: #138a4b;
    --entry-warning: #b96800;
    --entry-info: #0b6b9a;
}

.portal-entry-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 10% 15%, rgba(255, 255, 255, 0.9), transparent 30rem),
        var(--entry-background);
    color: var(--entry-ink);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.portal-entry-page *,
.portal-entry-page *::before,
.portal-entry-page *::after {
    box-sizing: border-box;
}

.portal-entry-page button,
.portal-entry-page input {
    font: inherit;
}

.portal-entry {
    display: grid;
    min-height: 100vh;
    padding: clamp(16px, 3vw, 42px);
    place-items: center;
}

.entry-shell {
    display: grid;
    width: min(1200px, 100%);
    overflow: hidden;
    background: var(--entry-surface);
    border: 1px solid rgba(16, 26, 53, 0.08);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(35, 48, 66, 0.16);
}

.entry-intro {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(26px, 4vw, 52px);
    border-bottom: 1px solid var(--entry-border);
    overflow: hidden;
}

.entry-intro::after {
    position: absolute;
    right: -12%;
    bottom: -42%;
    left: -12%;
    height: 55%;
    content: "";
    background:
        radial-gradient(ellipse at 8% 100%, rgba(215, 25, 32, 0.2) 0 28%, transparent 29%),
        radial-gradient(ellipse at 8% 100%, rgba(82, 102, 129, 0.12) 0 39%, transparent 40%);
    pointer-events: none;
}

.entry-brand,
.entry-intro-copy,
.entry-paths,
.entry-tagline {
    position: relative;
    z-index: 1;
}

.entry-brand {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.entry-brand-image {
    display: block;
    width: auto;
    max-width: min(100%, 330px);
    height: auto;
    max-height: 92px;
    object-fit: contain;
    object-position: left center;
}

.entry-brand-fallback {
    display: grid;
    width: 70px;
    height: 70px;
    border: 1px solid rgba(215, 25, 32, 0.2);
    border-radius: 18px;
    color: var(--entry-accent);
    background: rgba(215, 25, 32, 0.08);
    font-size: 2.8rem;
    place-items: center;
}

.entry-intro-copy h1,
.entry-panel-heading h2 {
    margin: 0;
    color: var(--entry-ink);
    font-weight: 750;
    letter-spacing: -0.035em;
}

.entry-intro-copy h1 {
    color: var(--entry-accent);
    font-size: clamp(2.1rem, 4vw, 3.1rem);
    line-height: 1.05;
}

.entry-lead {
    margin: 10px 0 0;
    color: var(--entry-ink);
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    font-weight: 650;
}

.entry-description {
    max-width: 540px;
    margin: 12px 0 0;
    color: var(--entry-muted);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.45;
}

.entry-paths {
    margin-top: 28px;
}

.entry-paths h2 {
    margin: 0 0 10px;
    color: #75859b;
    font-size: 1rem;
    font-weight: 700;
}

.entry-path-list {
    display: grid;
    gap: 10px;
}

.entry-path {
    display: flex;
    min-height: 78px;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid var(--entry-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.entry-path.is-active {
    border-color: var(--entry-accent);
    background: #fff5f5;
    box-shadow: 0 0 0 1px var(--entry-accent);
}

.entry-path-icon {
    display: grid;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #53657c;
    background: #eef1f4;
    font-size: 1.8rem;
}

.entry-path-icon--area,
.entry-path-icon--filiacao {
    color: var(--entry-accent);
    background: #ffebed;
}

.entry-path-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.entry-path-copy strong {
    color: var(--entry-ink);
    font-size: 1.1rem;
    line-height: 1.15;
}

.entry-path-copy small {
    color: var(--entry-muted);
    font-size: 0.98rem;
    line-height: 1.25;
}

.entry-tagline {
    display: grid;
    margin-top: 28px;
    text-align: center;
    color: var(--entry-muted);
    font-size: 1rem;
    line-height: 1.35;
}

.entry-tagline strong {
    color: var(--entry-ink);
    font-size: 1.2rem;
}

.entry-panel {
    display: flex;
    min-width: 0;
    align-items: center;
    padding: clamp(18px, 3vw, 38px);
    background: #fbfcfd;
}

.entry-panel-card {
    width: min(100%, 560px);
    margin: 0 auto;
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid #e3e8ee;
    border-radius: 15px;
    background: var(--entry-surface);
    box-shadow: 0 8px 25px rgba(29, 44, 62, 0.05);
}

.entry-status {
    --entry-status-color: var(--entry-success);
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 10px 14px;
    border: 1px solid #a9e1c4;
    border-radius: 10px;
    color: var(--entry-success);
    background: #edfbf3;
}

.entry-status--warning {
    --entry-status-color: #d17a00;
    border-color: #ffc05c;
    color: var(--entry-warning);
    background: #fff6e5;
}

.entry-status--accent {
    --entry-status-color: var(--entry-accent);
    border-color: #ffd0d3;
    color: var(--entry-accent);
    background: #fff3f4;
}

.entry-status-icon {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    background: var(--entry-status-color);
    font-size: 1.3rem;
    place-items: center;
}

.entry-status-icon i {
    color: #fff;
}

.entry-status strong {
    font-size: 1rem;
}

.entry-panel-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.1;
}

.entry-panel-heading p {
    max-width: 540px;
    margin: 12px 0 25px;
    color: var(--entry-muted);
    font-size: 1.1rem;
    line-height: 1.4;
}

.entry-field-group {
    margin-bottom: 18px;
}

.entry-field-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--entry-ink);
    font-size: 0.95rem;
    font-weight: 650;
}

.entry-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.entry-input-icon {
    position: absolute;
    left: 16px;
    z-index: 1;
    color: #657890;
    font-size: 1.35rem;
    pointer-events: none;
}

.entry-input-wrap input {
    width: 100%;
    min-height: 58px;
    padding: 13px 16px 13px 50px;
    border: 1px solid #cbd6e2;
    border-radius: 11px;
    outline: none;
    color: var(--entry-ink);
    background: #fff;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.entry-input-wrap input::placeholder {
    color: #99a8ba;
}

.entry-input-wrap input:focus {
    border-color: var(--entry-accent);
    box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.14);
}

.entry-input-wrap input:disabled {
    color: #7c8da1;
    background: #f7f9fb;
}

.entry-password-group .entry-input-wrap input {
    padding-right: 58px;
}

.entry-password-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    display: grid;
    width: 52px;
    height: 56px;
    border: 0;
    border-left: 1px solid #dce3eb;
    border-radius: 0 10px 10px 0;
    color: #60758f;
    background: #f7f9fb;
    place-items: center;
}

.entry-password-toggle:hover,
.entry-password-toggle:focus-visible {
    color: var(--entry-accent);
    background: #eef2f6;
}

.entry-password-toggle:focus-visible,
.entry-primary-button:focus-visible,
.entry-secondary-actions button:focus-visible,
.entry-flow-actions button:focus-visible {
    outline: 3px solid rgba(215, 25, 32, 0.28);
    outline-offset: 2px;
}

.entry-field-help {
    display: block;
    margin-top: 6px;
    color: #718399;
    font-size: 0.85rem;
}

.entry-field-error {
    margin-top: 6px;
    color: #b4232b;
    font-size: 0.88rem;
    font-weight: 600;
}

.entry-input-wrap input.is-invalid {
    border-color: #c92b36;
}

.entry-feedback {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.4;
}

.entry-feedback--error {
    border-color: #f1b4b8;
    color: #8e1b25;
    background: #fff4f4;
}

.entry-feedback--success {
    border-color: #b2e1c7;
    color: #126b3d;
    background: #effbf4;
}

.entry-primary-button {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 22px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, var(--entry-accent), var(--entry-accent-dark));
    font-weight: 700;
    font-size: 1.07rem;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.entry-primary-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(173, 17, 23, 0.23);
}

.entry-primary-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.entry-button-arrow {
    font-size: 1.35rem;
}

.entry-spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: entry-spin 700ms linear infinite;
}

@keyframes entry-spin {
    to {
        transform: rotate(360deg);
    }
}

.entry-flow-actions {
    margin-top: 2px;
}

.entry-flow-actions p {
    margin: 0 0 18px;
    color: var(--entry-muted);
    font-size: 1rem;
    line-height: 1.45;
}

.entry-secondary-actions {
    display: flex;
    min-height: 28px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
    margin-top: 14px;
}

.entry-secondary-actions a,
.entry-secondary-actions button {
    padding: 2px;
    border: 0;
    color: #41546b;
    background: transparent;
    font-size: 0.96rem;
    text-decoration: underline;
    cursor: pointer;
}

.entry-secondary-actions a:hover,
.entry-secondary-actions button:hover {
    color: var(--entry-accent);
}

.entry-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 22px;
    padding: 14px 15px;
    border: 1px solid #d7e0e9;
    border-radius: 10px;
    color: var(--entry-muted);
    background: #f7f9fb;
    font-size: 0.94rem;
    line-height: 1.4;
}

.entry-info > i {
    flex: 0 0 auto;
    color: var(--entry-info);
    font-size: 1.25rem;
}

.entry-divider {
    height: 1px;
    margin: 22px 0;
    background: #e0e6ec;
}

.entry-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #cbd8e4;
    border-radius: 10px;
    color: var(--entry-muted);
    background: #fafcfd;
    font-size: 0.88rem;
    text-align: center;
}

.entry-security i {
    flex: 0 0 auto;
    color: #08768a;
    font-size: 1.35rem;
}

.entry-security strong {
    color: #056177;
}

.entry-panel-card [hidden] {
    display: none !important;
}

@media (min-width: 901px) {
    .entry-shell {
        grid-template-columns: minmax(0, 1fr) minmax(390px, 0.92fr);
    }

    .entry-intro {
        border-right: 1px solid var(--entry-border);
        border-bottom: 0;
    }
}

@media (max-width: 900px) {
    .portal-entry {
        align-items: start;
    }

    .entry-paths,
    .entry-tagline {
        display: none;
    }
}

@media (max-width: 560px) {
    .portal-entry {
        padding: 12px;
    }

    .entry-shell {
        border-radius: 16px;
    }

    .entry-intro {
        padding: 26px 18px 24px;
    }

    .entry-brand {
        min-height: 58px;
        margin-bottom: 22px;
    }

    .entry-brand-image {
        max-height: 72px;
    }

    .entry-intro-copy h1 {
        font-size: 2.15rem;
    }

    .entry-lead {
        font-size: 1rem;
    }

    .entry-description {
        font-size: 0.98rem;
    }

    .entry-path {
        min-height: 70px;
        gap: 12px;
        padding: 9px 11px;
    }

    .entry-path-icon {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
        font-size: 1.45rem;
    }

    .entry-path-copy strong {
        font-size: 0.98rem;
    }

    .entry-path-copy small {
        font-size: 0.86rem;
    }

    .entry-tagline {
        margin-top: 22px;
        font-size: 0.9rem;
    }

    .entry-tagline strong {
        font-size: 1.05rem;
    }

    .entry-panel {
        padding: 12px;
    }

    .entry-panel-card {
        padding: 20px 16px;
    }

    .entry-panel-heading h2 {
        font-size: 1.8rem;
    }

    .entry-panel-heading p {
        font-size: 1rem;
    }

    .entry-security {
        align-items: flex-start;
        font-size: 0.8rem;
        text-align: left;
    }
}

@media (max-width: 360px) {
    .portal-entry {
        padding: 8px;
    }

    .entry-intro {
        padding: 22px 14px;
    }

    .entry-panel {
        padding: 8px;
    }

    .entry-panel-card {
        padding: 18px 13px;
    }

    .entry-path-copy small {
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-entry-page *,
    .portal-entry-page *::before,
    .portal-entry-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
