@import url('home1.css');

.auth-page {
    /* Escopo dedicado para autenticação:
       evita conflitos com resets globais e utilitários (ex.: Tailwind CDN)
       que podem zerar color/text-fill e deixar o texto do input invisível. */
    --auth-input-text: #111827;
    --auth-input-bg: #ffffff;
}

.auth-page .login-card input,
.auth-page .login-card select,
.auth-page .login-card textarea,
.auth-page .form-control {
    color: var(--auth-input-text);
    background-color: var(--auth-input-bg);
    -webkit-text-fill-color: var(--auth-input-text);
    caret-color: var(--auth-input-text);
}

/* Corrige autofill do navegador que aplica fundo cinza nos inputs. */
.auth-page .login-card input:-webkit-autofill,
.auth-page .login-card input:-webkit-autofill:hover,
.auth-page .login-card input:-webkit-autofill:focus,
.auth-page .login-card textarea:-webkit-autofill,
.auth-page .login-card textarea:-webkit-autofill:hover,
.auth-page .login-card textarea:-webkit-autofill:focus,
.auth-page .login-card select:-webkit-autofill,
.auth-page .login-card select:-webkit-autofill:hover,
.auth-page .login-card select:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-input-text);
    box-shadow: 0 0 0 1000px var(--auth-input-bg) inset;
}

.auth-page.login-page {
    background: #ffffff;
    padding: 48px 20px 72px;
}

.auth-page.auth-page--centered {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.auth-page.auth-page--centered .login-container {
    width: 100%;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-page .admin-auth-header {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 600;
    color: var(--brand);
    letter-spacing: 0.02em;
    font-size: 0.95rem;
}

.auth-page .login-container {
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: center;
}

.auth-page .login-container--single {
    max-width: 980px;
}

.auth-page .login-info {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(15, 30, 60, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-page .login-info h1 {
    font-size: clamp(24px, 3vw, 34px);
    margin: 0 0 12px;
    color: var(--brand);
}

.auth-page .login-info p {
    margin: 0 0 18px;
    color: #4b5563;
    line-height: 1.6;
}

.auth-page .login-logo {
    width: 160px;
    height: auto;
    margin-bottom: 18px;
}

.auth-page .login-highlights {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: grid;
    gap: 10px;
    color: #374151;
}

.auth-page .login-highlights i {
    color: var(--success);
    margin-right: 8px;
}

.auth-page .login-contact {
    font-size: 14px;
    color: #4b5563;
}

.auth-page .login-contact a {
    color: var(--brand);
    font-weight: 600;
}

.auth-page .login-card {
    background: var(--card);
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 24px 50px rgba(15, 30, 60, 0.12);
    border: 1px solid var(--border);
}

.auth-page .forgot-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.auth-page .login-card-header {
    margin-bottom: 20px;
}

.auth-page .login-card-header h2 {
    font-size: 24px;
    margin: 0 0 8px;
    color: var(--ink);
}

.auth-page .login-card-header p {
    margin: 0;
    color: #6b7280;
}

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

.auth-page .login-card label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.35rem;
    color: #1f2937;
}

.auth-page .login-card input[type="text"],
.auth-page .login-card input[type="password"],
.auth-page .login-card input[type="email"] {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-page .login-card input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(26, 59, 107, 0.15);
    outline: none;
}

.auth-page .flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.auth-page .forgot-footer {
    margin-top: 4px;
}

.auth-page .checkbox-field {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #4b5563;
}

.auth-page .checkbox-field label {
    margin: 0;
    white-space: nowrap;
    cursor: pointer;
}

.auth-page .checkbox-field input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1px solid #cbd5f5;
    border-radius: 4px;
    background-color: #ffffff;
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    place-content: center;
}

.auth-page .checkbox-field input[type="checkbox"]:checked {
    background-color: #ffffff;
    border-color: var(--brand);
}

.auth-page .checkbox-field input[type="checkbox"]::after {
    content: "";
    width: 6px;
    height: 10px;
    border-right: 2px solid var(--brand);
    border-bottom: 2px solid var(--brand);
    transform: rotate(45deg);
    opacity: 0;
}

.auth-page .checkbox-field input[type="checkbox"]:checked::after {
    opacity: 1;
}

.auth-page .login-card a {
    color: var(--brand);
    font-weight: 600;
}

.auth-page .login-card a:hover {
    text-decoration: underline;
}

.auth-page .btn-primary {
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-page .btn-primary:hover {
    background: var(--brand-2);
    box-shadow: 0 12px 20px rgba(26, 59, 107, 0.2);
    transform: translateY(-1px);
}

.auth-page .alert {
    padding: 0.75rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.auth-page .alert-error {
    background: #ffe5e5;
    border: 1px solid #f87171;
    color: #991b1b;
}

.auth-page .alert-success {
    background: #dcfce7;
    border: 1px solid var(--success);
    color: var(--success);
}

.auth-page .btn-loading {
    position: relative;
    opacity: 0.8;
    pointer-events: none;
}

.auth-page .btn-loading::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    animation: btn-spin 1s linear infinite;
}

.auth-page .forgot-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.auth-page .forgot-steps .step {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: #6b7280;
    background: #f9fafb;
}

.auth-page .forgot-steps .step.active {
    color: var(--brand);
    border-color: rgba(26, 59, 107, 0.3);
    background: rgba(26, 59, 107, 0.08);
}

.auth-page .forgot-helper {
    margin: 0 0 12px;
    font-size: 0.875rem;
    color: #6b7280;
}

.auth-page .hidden {
    display: none;
}

.auth-page .status-modal-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@keyframes btn-spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

@media (min-width: 992px) {
    .auth-page .login-container {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: stretch;
    }

    .auth-page .login-info {
        padding: 36px;
    }
}
