/* Reset e configurações gerais */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Pontos decorativos de fundo */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(30, 64, 175, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(30, 58, 138, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Container principal */
.auth-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

/* Card principal */
.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* Logo */
.auth-logo {
    margin-bottom: 30px;
}

.auth-logo img {
    max-width: 200px;
    height: auto;
    border-radius: 10px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

/* Título */
.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-size: 16px;
    color: #475569;
    margin-bottom: 30px;
    line-height: 1.5;
    font-weight: 500;
}

/* Formulário */
.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    font-size: 16px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    outline: none;
    font-weight: 500;
}

.form-input:focus {
    border-color: #1e40af;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.15);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Grupo de senha com toggle */
.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #1e40af;
}

/* Header da senha (label + esqueceu senha) */
.password-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.forgot-password {
    font-size: 13px;
    color: #1e40af;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

/* Botão principal */
.auth-button {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.auth-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
}

.auth-button:hover::before {
    left: 100%;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(30, 64, 175, 0.4);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
}

.auth-button:active {
    transform: translateY(0);
}

/* Links de navegação */
.auth-links {
    margin-top: 25px;
    text-align: center;
}

.auth-link {
    color: #1e40af;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

.auth-link i {
    font-size: 16px;
}

/* Mensagens de alerta */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid;
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.3);
}

.alert-success {
    background: rgba(5, 150, 105, 0.1);
    color: #047857;
    border-color: rgba(5, 150, 105, 0.3);
}

.alert-warning {
    background: rgba(217, 119, 6, 0.1);
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.3);
}

.alert-info {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.3);
}

/* Responsividade */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 25px;
        margin: 15px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .auth-subtitle {
        font-size: 14px;
    }
    
    .form-input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .auth-button {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .auth-logo img {
        max-width: 160px;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading state para botão */
.auth-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.auth-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilo para placeholder de logo se não tiver imagem */
.logo-placeholder {
    width: 200px;
    height: 80px;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 30px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.3);
}

.logo-placeholder h2 {
    font-size: 24px;
    margin: 0;
}

.logo-placeholder span {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
}

/* Melhorias adicionais para contraste */
.form-input:disabled {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.auth-button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-button:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Estilo para campos com erro */
.form-input.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input.error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

/* Texto de ajuda para campos */
.form-help {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
}

.form-help.error {
    color: #dc2626;
}