/* Photo.art — telas de autenticação */

.auth-page {
    --auth-green: var(--br-green, #006B3F);
    --auth-blue: var(--br-blue, #002776);
    --auth-yellow: var(--br-yellow, #FFCC00);
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 204, 0, 0.18), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(0, 107, 63, 0.12), transparent),
        linear-gradient(165deg, #f0f7f4 0%, #e8eef8 45%, #f7f9fc 100%);
}

.auth-page main {
    max-width: 520px;
    padding: 24px 16px 48px;
}

.auth-shell {
    animation: authSlideUp 0.55s ease-out both;
}

@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-hero {
    text-align: center;
    margin-bottom: 28px;
}

.auth-hero .brand-logo img {
    height: 56px !important;
    filter: drop-shadow(0 4px 12px rgba(0, 39, 118, 0.12));
}

.auth-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(0, 107, 63, 0.1);
    color: var(--auth-green);
    border: 1px solid rgba(0, 107, 63, 0.2);
}

.auth-hero h1 {
    margin: 16px 0 8px;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--auth-blue);
    line-height: 1.2;
}

.auth-hero p {
    margin: 0;
    font-size: 0.95rem;
    color: #5a6a7e;
    line-height: 1.5;
}

/* —— Modal social flutuante —— */
.auth-social-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 39, 118, 0.45);
    backdrop-filter: blur(6px);
    animation: authFadeIn 0.3s ease-out;
}

@keyframes authFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-social-modal {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 24px 60px rgba(0, 39, 118, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    animation: authModalPop 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes authModalPop {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-social-modal-header {
    background: linear-gradient(135deg, var(--auth-green) 0%, #008f52 55%, var(--auth-blue) 100%);
    padding: 22px 24px 20px;
    color: #fff;
    text-align: center;
    position: relative;
}

.auth-social-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--auth-yellow), #ffe566, var(--auth-yellow));
}

.auth-social-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
}

.auth-social-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.auth-social-modal-header h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 800;
}

.auth-social-modal-header p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.auth-social-body {
    padding: 22px 24px 24px;
}

/* —— Seletor de perfil —— */
.auth-role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.auth-role-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 6px;
    border-radius: 14px;
    border: 2px solid #e8ecf2;
    background: #fafbfc;
    cursor: pointer;
    font: inherit;
    width: 100%;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s;
    text-align: center;
}

.auth-role-card:hover {
    border-color: rgba(0, 107, 63, 0.35);
    background: #f4faf7;
}

.auth-role-card.active {
    border-color: var(--auth-green);
    background: linear-gradient(180deg, #f0faf5 0%, #fff 100%);
    box-shadow: 0 4px 14px rgba(0, 107, 63, 0.15);
    transform: translateY(-1px);
}

.auth-role-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-role-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.auth-role-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--auth-blue);
    line-height: 1.2;
}

.auth-role-card.active .auth-role-label {
    color: var(--auth-green);
}

/* —— Botões sociais —— */
.auth-btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 18px;
    margin-bottom: 10px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid #e8ecf2;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.auth-btn-social:hover:not(:disabled) {
    border-color: #c5d4e8;
    box-shadow: 0 6px 18px rgba(0, 39, 118, 0.1);
    transform: translateY(-1px);
    color: #1f2937;
}

.auth-btn-social:disabled,
.auth-btn-social.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.auth-btn-google .auth-social-g {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e7eb;
    font-weight: 800;
    font-size: 13px;
    color: #4285f4;
}

.auth-btn-apple .auth-social-icon {
    font-size: 18px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8ecf2;
}

.auth-btn-email-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    border-radius: 14px;
    border: 2px dashed rgba(0, 107, 63, 0.35);
    background: rgba(0, 107, 63, 0.06);
    color: var(--auth-green);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.auth-btn-email-toggle:hover {
    background: rgba(0, 107, 63, 0.12);
    border-color: var(--auth-green);
}

/* —— Card do formulário —— */
.auth-form-card {
    background: #fff;
    border-radius: 24px;
    padding: 28px 26px;
    box-shadow:
        0 16px 48px rgba(0, 39, 118, 0.1),
        0 0 0 1px rgba(0, 107, 63, 0.06);
    border-top: 4px solid var(--auth-green);
    position: relative;
    overflow: hidden;
}

.auth-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.15), transparent 70%);
    pointer-events: none;
}

.auth-form-card h2 {
    margin: 0 0 4px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--auth-blue);
}

.auth-form-card .auth-form-sub {
    margin: 0 0 20px;
    font-size: 0.85rem;
    color: #6b7c93;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--auth-blue);
}

.auth-field input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8ecf2;
    border-radius: 12px;
    font-size: 15px;
    background: #fafbfc;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    box-sizing: border-box;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--auth-green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 107, 63, 0.12);
}

.auth-field input::placeholder {
    color: #b0bac8;
}

/* Linhas compactas: nome|e-mail ; nascimento|senha */
.auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
}

.auth-field-row .auth-field {
    min-width: 0;
}

/* Olho da senha nas telas auth (não dependem de photome.css) */
.auth-form .input-password-wrap,
.auth-card .input-password-wrap,
.auth-field .input-password-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.auth-form .input-password-wrap > input,
.auth-card .input-password-wrap > input,
.auth-field .input-password-wrap > input {
    width: 100%;
    padding-right: 2.75rem !important;
    box-sizing: border-box;
}

button.input-password-toggle,
.auth-form .input-password-toggle,
.auth-card .input-password-toggle,
.auth-field .input-password-toggle {
    position: absolute !important;
    right: 6px;
    top: 50%;
    transform: translateY(-50%) !important;
    z-index: 3;
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #64748b !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 400;
}

button.input-password-toggle:hover,
.auth-form .input-password-toggle:hover,
.auth-card .input-password-toggle:hover {
    color: var(--auth-green) !important;
    background: rgba(0, 107, 63, 0.08) !important;
    transform: translateY(-50%) !important;
    filter: none !important;
}

.input-password-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    pointer-events: none;
}

/* Ajuda (?) sempre círculo — evita oval no mobile (padding global de button) */
button.photome-help-trigger,
.photome-help-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    aspect-ratio: 1 / 1;
    margin-left: 4px;
    padding: 0 !important;
    border: 1px solid #006B3F !important;
    border-radius: 50% !important;
    background: #006B3F !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    flex-shrink: 0;
    box-sizing: border-box;
    vertical-align: middle;
}

@media (max-width: 560px) {
    .auth-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.auth-perks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 18px 0;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 39, 118, 0.04), rgba(0, 107, 63, 0.06));
    border: 1px solid rgba(0, 107, 63, 0.1);
}

.auth-perk {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #4a5a6e;
    line-height: 1.35;
}

.auth-perk span:first-child {
    font-size: 14px;
    flex-shrink: 0;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 24px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--auth-green) 0%, #008f52 100%);
    box-shadow: 0 6px 20px rgba(0, 107, 63, 0.35);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.auth-submit:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 107, 63, 0.4);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-terms {
    margin: 14px 0 0;
    font-size: 12px;
    color: #8a96a8;
    text-align: center;
    line-height: 1.5;
}

.auth-footer-links {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6b7c93;
}

.auth-open-social {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #dce3f0;
    background: #fff;
    color: var(--auth-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.auth-open-social:hover {
    background: #f4f7fc;
    border-color: var(--auth-green);
    color: var(--auth-green);
}

.auth-alert {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
}

.auth-alert-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #b8dfc4;
}

.auth-alert-err {
    background: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f5c6c6;
}

@media (max-width: 400px) {
    .auth-role-grid {
        grid-template-columns: 1fr;
    }

    .auth-role-card {
        flex-direction: row;
        justify-content: flex-start;
        padding: 12px 14px;
        gap: 10px;
    }

    .auth-perks {
        grid-template-columns: 1fr;
    }

    .auth-social-modal {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        align-self: flex-end;
    }

    .auth-social-backdrop {
        align-items: flex-end;
        padding: 0;
    }
}

.auth-hero-tag--on-hero {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto 20px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.auth-brand {
    text-align: center;
    margin-bottom: 8px;
}

.auth-brand--hero {
    margin-bottom: 12px;
}

.auth-brand-logo {
    display: inline-flex;
    justify-content: center;
}

.auth-brand-logo img {
    width: auto !important;
    max-width: min(340px, 92vw);
    height: auto !important;
    object-fit: contain;
}

.auth-brand-slogan {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: #6b7c93;
    line-height: 1.45;
}

.auth-brand-slogan--hero {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.auth-hero-wrap .auth-brand-logo img {
    filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.35));
}

.auth-page--register .auth-shell {
    text-align: center;
}

.auth-page--register .auth-hero-tag--on-hero {
    display: inline-flex;
}

.auth-page--register .auth-alert,
.auth-page--register .auth-form-card {
    text-align: left;
}

@media (max-width: 767px) {
    .auth-page main {
        padding: 12px 12px 32px;
    }

    .auth-form-card {
        padding: 22px 18px;
    }

    .auth-field input {
        font-size: 16px;
        min-height: 48px;
    }

    .auth-submit {
        min-height: 52px;
        font-size: 17px;
    }
}
