/* WayGest Gestão — página de autenticação */

.auth-page {
    min-height: 100vh;
    display: flex;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--waygest-light-gray, #F5F6FA);
}

/* Painel de marca */
.auth-brand {
    position: relative;
    flex: 0 0 44%;
    max-width: 44%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 3.5rem;
    background: linear-gradient(145deg, var(--waygest-dark-blue, #2D3142) 0%, #1a1d2e 55%, #252a3d 100%);
    color: var(--waygest-text-light, #fff);
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.auth-brand::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -60px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.auth-brand__content {
    position: relative;
    z-index: 1;
}

.auth-brand__logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2.5rem;
}

.auth-brand__logo img {
    height: 48px;
    width: auto;
}

.auth-brand__logo-text {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-brand__logo-text span {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.75;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-brand__headline {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    max-width: 22rem;
}

.auth-brand__headline em {
    font-style: normal;
    color: var(--waygest-purple-light, #8B85FF);
}

.auth-brand__subtitle {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.82;
    max-width: 26rem;
    margin-bottom: 2.5rem;
}

.auth-brand__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-brand__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    font-size: 0.925rem;
    line-height: 1.45;
}

.auth-brand__feature-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(108, 99, 255, 0.2);
    color: var(--waygest-purple-light, #8B85FF);
    font-size: 0.9rem;
}

.auth-brand__footer {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    opacity: 0.55;
}

/* Painel do formulário */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-form-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form-mobile-logo img {
    height: 44px;
    margin-bottom: 0.5rem;
}

.auth-form-mobile-logo p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--waygest-text-primary, #2D3142);
    margin: 0;
}

.auth-form-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.25rem 2rem;
    box-shadow: 0 4px 24px rgba(45, 49, 66, 0.08), 0 1px 3px rgba(45, 49, 66, 0.06);
    border: 1px solid rgba(108, 99, 255, 0.08);
}

.auth-form-card__header {
    margin-bottom: 1.75rem;
}

.auth-form-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--waygest-text-primary, #2D3142);
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
}

.auth-form-card__subtitle {
    font-size: 0.925rem;
    color: var(--waygest-text-secondary, #6c757d);
    margin: 0;
}

/* Alertas */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.auth-alert--success {
    background: rgba(40, 167, 69, 0.08);
    border-color: rgba(40, 167, 69, 0.25);
    color: #1e7e34;
}

.auth-alert--error {
    background: rgba(220, 53, 69, 0.08);
    border-color: rgba(220, 53, 69, 0.25);
    color: #c82333;
}

/* Campos */
.auth-field {
    margin-bottom: 1.25rem;
}

.auth-field__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--waygest-text-primary, #2D3142);
    margin-bottom: 0.45rem;
}

.auth-field__input-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.auth-field__icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--waygest-text-secondary, #6c757d);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 2;
}

.auth-field__input {
    width: 100%;
    padding: 0.75rem 0.9rem 0.75rem 2.65rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--waygest-text-primary, #2D3142);
    background: var(--waygest-light-gray, #F5F6FA);
    border: 1.5px solid transparent;
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-field__input--password {
    padding-right: 2.75rem;
}

.auth-field__input::placeholder {
    color: #adb5bd;
}

.auth-field__input:hover {
    background: #eef0f5;
}

.auth-field__input:focus {
    outline: none;
    background: #fff;
    border-color: var(--waygest-purple, #6C63FF);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.auth-field__input.is-invalid {
    border-color: var(--waygest-danger, #dc3545);
    background: rgba(220, 53, 69, 0.04);
}

.auth-field__input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.auth-field__toggle-password {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.35rem;
    color: var(--waygest-text-secondary, #6c757d);
    cursor: pointer;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.auth-field__toggle-password:hover {
    color: var(--waygest-purple, #6C63FF);
    background: rgba(108, 99, 255, 0.08);
}

.auth-field__toggle-password:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.3);
}

.auth-field__error {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    color: var(--waygest-danger, #dc3545);
}

/* Linha remember + esqueci senha */
.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--waygest-purple, #6C63FF);
    cursor: pointer;
}

.auth-checkbox span {
    font-size: 0.875rem;
    color: var(--waygest-text-secondary, #6c757d);
}

.auth-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--waygest-purple, #6C63FF) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--waygest-purple-dark, #5A52E5) !important;
    text-decoration: underline;
}

/* Botão submit */
.auth-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--waygest-purple, #6C63FF) 0%, var(--waygest-purple-dark, #5A52E5) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.35);
}

.auth-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.35);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-submit__spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
}

.auth-submit.is-loading .auth-submit__spinner {
    display: inline-block;
}

.auth-submit.is-loading .auth-submit__label {
    opacity: 0.85;
}

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

.auth-form-footer {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(45, 49, 66, 0.08);
}

.auth-form-footer p {
    font-size: 0.8125rem;
    color: var(--waygest-text-secondary, #6c757d);
    margin: 0;
}

/* Responsivo */
@media (max-width: 991.98px) {
    .auth-page {
        flex-direction: column;
    }

    .auth-brand {
        display: none;
    }

    .auth-form-mobile-logo {
        display: block;
    }

    .auth-form-panel {
        flex: 1;
        padding: 2rem 1.25rem 2.5rem;
    }
}

@media (max-width: 575.98px) {
    .auth-form-card {
        padding: 1.75rem 1.25rem;
        border-radius: 12px;
    }

    .auth-form-card__title {
        font-size: 1.3rem;
    }
}
