/* ============================================
   ARQUIVO: login.css
   DESCRIÇÃO: Estilos customizados premium para tela de Login
   CAMINHO: /assets/css/login.css
   ============================================ */

/* ===== VARIÁVEIS DE CORES DA MARCA ALTERNATIVA ===== */
:root {
    --alt-brand: #C8102E;
    --alt-brand-hover: #A40D26;
    --alt-brand-light: #F9E5E8;
    --alt-black: #111111;
    --alt-gray: #555555;
    --alt-white: #FFFFFF;
    --alt-surface: #F2E6DA;
    --alt-border: #E6E6E6;
}

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
    background-color: var(--alt-white);
    color: var(--alt-black);
    line-height: 1.6;
}

/* ===== CONTAINER PRINCIPAL LOGIN ===== */
.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ===== SEÇÃO ESQUERDA - BRANDING ===== */
.login-brand-section {
    position: relative;
    width: 50%;
    background-color: var(--alt-brand);
    background: linear-gradient(135deg, var(--alt-brand) 0%, var(--alt-brand-hover) 100%);
    overflow: hidden;
}

.login-brand-bg {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    pointer-events: none;
}

.login-brand-circle-1 {
    position: absolute;
    top: 5rem;
    left: 2.5rem;
    width: 24rem;
    height: 24rem;
    background: var(--alt-white);
    border-radius: 50%;
    filter: blur(80px);
    animation: float-slow 20s ease-in-out infinite;
}

.login-brand-circle-2 {
    position: absolute;
    bottom: 5rem;
    right: 2.5rem;
    width: 20rem;
    height: 20rem;
    background: var(--alt-white);
    border-radius: 50%;
    filter: blur(80px);
    animation: float-slow 25s ease-in-out infinite reverse;
}

.login-brand-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    height: 100%;
    color: var(--alt-white);
}

.login-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .login-brand-logo img {
        height: 3rem;
        width: auto;
    }

.login-brand-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 32rem;
}

.login-brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.login-brand-subtitle {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.login-brand-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

    .login-feature-card:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateX(0.5rem);
    }

.login-feature-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.login-feature-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.login-feature-content p {
    font-size: 0.875rem;
    opacity: 0.85;
    line-height: 1.5;
}

.login-brand-footer {
    font-size: 0.875rem;
    opacity: 0.75;
}

/* ===== SEÇÃO DIREITA - FORMULÁRIO ===== */
.login-form-section {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--alt-white);
}

.login-form-wrapper {
    width: 100%;
    max-width: 28rem;
}

.login-logo-mobile {
    text-align: center;
    margin-bottom: 2rem;
}

    .login-logo-mobile img {
        height: 2.5rem;
        width: auto;
        margin-bottom: 0.5rem;
    }

    .login-logo-mobile p {
        font-size: 0.875rem;
        color: var(--alt-gray);
    }

.login-form-header {
    margin-bottom: 2rem;
}

.login-form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--alt-black);
    margin-bottom: 0.5rem;
}

.login-form-subtitle {
    font-size: 1rem;
    color: var(--alt-gray);
}

/* ===== ALERTAS ===== */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    animation: slideDown 0.4s ease-out;
}

.login-alert-error {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
}

.login-alert-success {
    background-color: #F0FDF4;
    border: 1px solid #BBF7D0;
}

.login-alert-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.login-alert-error .login-alert-icon {
    color: #DC2626;
}

.login-alert-success .login-alert-icon {
    color: #16A34A;
}

.login-alert-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.login-alert-error .login-alert-text {
    color: #991B1B;
}

.login-alert-success .login-alert-text {
    color: #166534;
}

/* ===== FORMULÁRIO ===== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-form-group {
    display: flex;
    flex-direction: column;
}

.login-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--alt-black);
    margin-bottom: 0.5rem;
}

.login-form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.login-forgot-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--alt-brand);
    text-decoration: none;
    transition: color 0.2s ease;
}

    .login-forgot-link:hover {
        color: var(--alt-brand-hover);
    }

.login-input-wrapper {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--alt-gray);
    font-size: 1.125rem;
    transition: color 0.2s ease;
}

.login-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--alt-black);
    background-color: var(--alt-white);
    border: 1px solid var(--alt-border);
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.2s ease;
}

    .login-input::placeholder {
        color: #999999;
    }

    .login-input:focus {
        border-color: var(--alt-brand);
        box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
    }

        .login-input:focus + .login-input-icon {
            color: var(--alt-brand);
        }

.login-input-with-toggle {
    padding-right: 3rem;
}

.login-toggle-password {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--alt-gray);
    font-size: 1.125rem;
    transition: all 0.2s ease;
    outline: none;
}

    .login-toggle-password:hover {
        color: var(--alt-brand);
        transform: translateY(-50%) scale(1.1);
    }

    .login-toggle-password:focus-visible {
        outline: 2px solid var(--alt-brand);
        outline-offset: 2px;
        border-radius: 0.25rem;
    }

.login-error-message {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: #DC2626;
}

/* ===== CHECKBOX ===== */
.login-remember-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-checkbox {
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--alt-border);
    border-radius: 0.25rem;
    cursor: pointer;
    accent-color: var(--alt-brand);
    transition: all 0.2s ease;
}

    .login-checkbox:focus {
        outline: 2px solid var(--alt-brand);
        outline-offset: 2px;
    }

.login-checkbox-label {
    font-size: 0.875rem;
    color: var(--alt-black);
    cursor: pointer;
    user-select: none;
}

/* ===== BOTÃO SUBMIT ===== */
.login-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--alt-white);
    background-color: var(--alt-brand);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

    .login-submit-btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        transform: translate(-50%, -50%);
        transition: width 0.6s ease, height 0.6s ease;
    }

    .login-submit-btn:hover {
        background-color: var(--alt-brand-hover);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
    }

        .login-submit-btn:hover::before {
            width: 300px;
            height: 300px;
        }

    .login-submit-btn:active {
        transform: translateY(0);
    }

    .login-submit-btn:focus-visible {
        outline: 2px solid var(--alt-brand);
        outline-offset: 2px;
    }

    .login-submit-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

        .login-submit-btn:disabled:hover {
            background-color: var(--alt-brand);
            box-shadow: none;
        }

.login-submit-icon {
    font-size: 1.125rem;
    position: relative;
    z-index: 1;
}

/* ===== FOOTER DO FORMULÁRIO ===== */
.login-form-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--alt-border);
}

.login-secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--alt-gray);
}

.login-secure-icon {
    color: var(--alt-brand);
    font-size: 1rem;
}

.login-support {
    margin-top: 1.5rem;
    text-align: center;
}

.login-support-text {
    font-size: 0.875rem;
    color: var(--alt-gray);
}

.login-support-link {
    color: var(--alt-brand);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

    .login-support-link:hover {
        color: var(--alt-brand-hover);
    }

/* ===== ANIMAÇÕES ===== */
@keyframes float-slow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 30px) scale(1.1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
    }

    .login-brand-section {
        width: 100%;
        min-height: auto;
        padding: 2rem 1.5rem;
    }

    .login-brand-content {
        padding: 0;
        gap: 2rem;
    }

    .login-brand-main {
        padding: 2rem 0;
    }

    .login-brand-title {
        font-size: 2rem;
    }

    .login-brand-subtitle {
        font-size: 1rem;
    }

    .login-form-section {
        width: 100%;
        padding: 2rem 1.5rem;
    }

    .login-logo-mobile {
        display: block;
    }
}

@media (min-width: 1025px) {
    .login-logo-mobile {
        display: none;
    }

    .login-form-section {
        box-shadow: -10px 0 30px -10px rgba(0, 0, 0, 0.05);
    }
}

@media (max-width: 640px) {
    .login-brand-title {
        font-size: 1.75rem;
    }

    .login-form-title {
        font-size: 1.75rem;
    }

    .login-feature-card {
        padding: 0.875rem;
    }
}

/* ===== ACESSIBILIDADE ===== */
*:focus-visible {
    outline: 2px solid var(--alt-brand);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

/* ===== UTILITÁRIOS ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
