@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
    /* Cores que combinam com a identidade visual da Aluforce */
    --primary-color: #2c3e50;
    --button-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 40%, #8b5cf6 100%);
    --button-hover-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 40%, #7c3aed 100%);
    --error-color: #ff6b6b;
    --success-color: #22c55e;
    --white: #ffffff;
    --text-color: #e0e0e0;
    --bg-overlay: rgba(0,0,0,0.45);
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-border: rgba(255, 255, 255, 0.2);
    --input-focus-border: rgba(59, 130, 246, 0.8);
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    /* Utiliza a imagem de fundo da Aluforce */
    background: url('/images/Papeldeparede-alu.webp') no-repeat center center;
    background-size: cover;
}

/* Skip-link for keyboard users */
.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    left: 12px;
    top: 12px;
    width: auto;
    height: auto;
    background: var(--white);
    color: var(--button-color);
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 2000;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

/* Efeito de vidro para o formulário de login */
.login-form {
    background: var(--bg-overlay);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 45px;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--button-gradient);
    border-radius: 20px 20px 0 0;
}

.login-form:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.login-logo {
    max-width: 180px;
    margin: 6px auto 14px auto;
    display: block;
    /* Preserve original aspect ratio and avoid squashing */
    width: auto;
    height: auto;
    max-height: 72px; /* keeps logo readable on larger screens */
    object-fit: contain;
}

/* Avatar do usuário */
.user-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 0 auto 24px auto;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    border: 3px solid rgba(255, 255, 255, 0.2);
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.user-avatar.show {
    display: flex;
    animation: avatarSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.user-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
}

.user-avatar img:hover {
    transform: scale(1.02);
}

.user-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.user-avatar .avatar-placeholder:hover {
    transform: scale(1.02);
}

.user-avatar .avatar-placeholder i {
    font-size: 36px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@keyframes avatarSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-30px) rotate(-10deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1) translateY(-5px) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0deg);
    }
}

.login-form h2 {
    color: var(--white);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.login-form.has-avatar h2 {
    margin-top: -10px;
    margin-bottom: 6px;
}

.login-form p {
    color: var(--text-color);
    margin-bottom: 28px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.login-form.has-avatar p {
    margin-bottom: 24px;
}

.form-group {
    text-align: left;
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
    transition: color 0.3s ease;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #9ca3af;
    font-size: 16px;
    z-index: 2;
    transition: color 0.3s ease;
}

.form-group input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 12px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    color: var(--white);
    font-size: 1rem;
    font-weight: 400;
}

.password-toggle {
    position: absolute;
    right: 15px;
    color: #9ca3af;
    cursor: pointer;
    font-size: 16px;
    z-index: 2;
    transition: color 0.3s ease;
    padding: 5px;
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
    opacity: 1;
    font-weight: 400;
}

.form-group input:focus {
    outline: none;
    border-color: var(--input-focus-border);
    background-color: rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 8px 24px rgba(30, 64, 175, 0.15);
    transform: translateY(-1px);
}

.form-group input:focus + .input-icon,
.form-group input:focus ~ .input-icon {
    color: #3b82f6;
}

.form-group input:focus ~ .password-toggle {
    color: #3b82f6;
}

.form-group:focus-within label {
    color: #3b82f6;
}

/* Estilos para o botão de submit e o spinner de carregamento */
button[type="submit"] {
    position: relative;
    width: 100%;
    padding: 16px;
    background: var(--button-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    height: 56px;
    box-shadow: 
        0 4px 14px rgba(30, 64, 175, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button[type="submit"]:hover {
    background: var(--button-hover-gradient);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(30, 64, 175, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

button[type="submit"]:hover::before {
    left: 100%;
}

button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 14px rgba(30, 64, 175, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* spinner visuals */
.spinner {
    border: 3px solid rgba(255,255,255,0.25);
    border-left-color: var(--white);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 0.9s linear infinite;
    display: inline-block;
    vertical-align: middle;
    transform-origin: center center;
    opacity: 0; /* hidden by default, shown via button.loading */
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Controla a visibilidade do texto e do spinner no botão */
button.loading .spinner {
    opacity: 1;
}

/* keep the button text visible but slightly faded when loading to avoid layout shift */
button.loading .btn-text {
    opacity: 0.9;
}

/* Estilo para a mensagem de erro */
.error-message {
    color: var(--error-color);
    margin-top: 16px;
    font-weight: 500;
    min-height: 22px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(-10px);
}

.error-message::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--error-color);
    font-size: 16px;
}

.error-message.visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.success-message {
    color: var(--success-color);
    margin-top: 16px;
    font-weight: 500;
    min-height: 22px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(-10px);
}

.success-message::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--success-color);
    font-size: 16px;
}

.success-message.visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Área de opções (Lembrar-me e Esqueceu senha) */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.remember-me:hover {
    color: var(--white);
}

.custom-checkbox {
    position: relative;
    width: 18px;
    height: 18px;
}

.custom-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.custom-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--button-gradient);
    border-color: #3b82f6;
    transform: scale(1.05);
}

.custom-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 10px;
    animation: checkmark 0.3s ease-out;
}

@keyframes checkmark {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.forgot-password {
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    position: relative;
}

.forgot-password:hover {
    color: #3b82f6;
    text-decoration: none;
}

.forgot-password::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

.forgot-password:hover::after {
    width: 100%;
}

/* ================================
   MODAL DE RECUPERAÇÁO DE SENHA
   ================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-overlay);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    margin: 20px;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    transform: scale(0.9) translateY(-20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--button-gradient);
    border-radius: 20px 20px 0 0;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h3 {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.modal-header p {
    color: var(--text-color);
    margin: 0;
    font-size: 0.95rem;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.modal-step {
    display: none;
    animation: fadeInSlide 0.5s ease-out;
}

.modal-step.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 8px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--button-gradient);
    transform: scale(1.2);
}

.modal-form-group {
    margin-bottom: 24px;
}

.modal-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.modal-input {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 12px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    color: var(--white);
    font-size: 1rem;
}

.modal-input:focus {
    outline: none;
    border-color: var(--input-focus-border);
    background-color: rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 8px 24px rgba(30, 64, 175, 0.15);
    transform: translateY(-1px);
}

.modal-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.modal-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-btn-primary {
    background: var(--button-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(30, 64, 175, 0.3);
}

.modal-btn-primary:hover {
    background: var(--button-hover-gradient);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
}

.modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.3);
}

.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.password-strength {
    margin-top: 8px;
    font-size: 12px;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 0;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 0%;
}

.strength-weak .strength-fill { width: 25%; background: #ef4444; }
.strength-fair .strength-fill { width: 50%; background: #f59e0b; }
.strength-good .strength-fill { width: 75%; background: #3b82f6; }
.strength-strong .strength-fill { width: 100%; background: #22c55e; }

.modal-message {
    margin: 20px 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.modal-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.modal-message.error-message {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.modal-message.success-message {
    color: var(--success-color);
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.modal-message.error-message::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.modal-message.success-message::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* Responsividade do Modal */
@media (max-width: 520px) {
    .modal-content {
        margin: 10px;
        padding: 30px 24px;
        border-radius: 16px;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-btn {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* Responsive adjustments for small screens */
@media (max-width: 480px) {
    .login-container { 
        padding: 16px; 
    }
    
    .login-form { 
        padding: 32px 24px; 
        border-radius: 16px; 
        margin: 20px 0;
    }
    
    .login-logo { 
        max-width: 140px; 
    }
    
    .login-form h2 { 
        font-size: 1.1rem; 
    }
    
    .form-group input { 
        font-size: 16px; 
        padding: 12px 12px 12px 40px; 
        height: 48px;
    }
    
    .input-icon {
        left: 12px;
        font-size: 14px;
    }
    
    .password-toggle {
        right: 12px;
        font-size: 14px;
    }
    
    button[type="submit"] { 
        height: 52px; 
        font-size: 15px;
        padding: 14px;
    }
    
    .error-message,
    .success-message {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .login-form {
        padding: 28px 20px;
    }
    
    .form-group input {
        padding: 10px 10px 10px 36px;
        height: 44px;
    }
    
    .input-icon {
        left: 10px;
    }
    
    .password-toggle {
        right: 10px;
    }
    
    .user-avatar {
        width: 70px;
        height: 70px;
        margin-bottom: 18px;
    }
    
    .user-avatar .avatar-placeholder {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .login-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        margin: 16px 0;
    }
    
    .forgot-password {
        align-self: center;
        font-size: 13px;
    }
}

/* ========================================
   TABLET - PORTRAIT (768px - 1024px)
   ======================================== */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    body {
        padding: 40px 20px;
    }
    
    .login-container {
        max-width: 500px;
    }
    
    .login-form {
        padding: 50px 45px;
    }
    
    .login-logo {
        max-width: 200px;
        max-height: 80px;
    }
    
    .user-avatar {
        width: 100px;
        height: 100px;
    }
    
    .login-form h2 {
        font-size: 1.4rem;
    }
    
    .login-form p {
        font-size: 1rem;
    }
    
    .form-group input {
        padding: 16px 16px 16px 48px;
        font-size: 16px;
    }
    
    button[type="submit"] {
        height: 56px;
        font-size: 16px;
    }
    
    .modal-content {
        max-width: 500px;
        max-height: 85vh;
    }
}

/* ========================================
   TABLET - LANDSCAPE (768px - 1280px)
   ======================================== */
@media (min-width: 768px) and (max-width: 1280px) and (orientation: landscape) {
    body {
        padding: 20px;
    }
    
    .login-container {
        max-width: 450px;
    }
    
    .login-form {
        padding: 35px 40px;
    }
    
    .login-logo {
        max-width: 160px;
        max-height: 60px;
        margin-bottom: 12px;
    }
    
    .user-avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 16px;
    }
    
    .login-form h2 {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }
    
    .login-form p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-group input {
        padding: 12px 14px 12px 44px;
        height: 48px;
    }
    
    button[type="submit"] {
        height: 50px;
        font-size: 15px;
    }
    
    .modal-content {
        max-width: 550px;
        max-height: 80vh;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
}

/* ========================================
   TABLET GENÉRICO (ambas orientações)
   ======================================== */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Modal de recuperação de senha */
    .modal-overlay {
        padding: 40px 20px;
    }
    
    .modal-content {
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 24px 28px 20px;
    }
    
    .modal-step {
        padding: 20px 28px 24px;
    }
    
    .modal-input {
        height: 50px;
        font-size: 16px;
    }
    
    .modal-btn {
        height: 48px;
        font-size: 15px;
    }
}

/* Animações de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-form {
    animation: slideInScale 0.6s ease-out;
}

.form-group {
    animation: fadeInUp 0.8s ease-out;
}

.form-group:nth-child(3) { animation-delay: 0.1s; }
.form-group:nth-child(4) { animation-delay: 0.2s; }
.form-group:nth-child(5) { animation-delay: 0.3s; }

.login-options {
    animation: fadeInUp 0.8s ease-out 0.35s both;
}

button[type="submit"] {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Melhor feedback visual */
.input-container:hover .input-icon {
    color: #3b82f6;
    transform: scale(1.1);
}

.form-group input:valid {
    border-color: rgba(34, 197, 94, 0.5);
}

.form-group input:valid + .input-icon {
    color: #22c55e;
}

/* Better focus ring for accessibility */
button[type="submit"]:focus { 
    outline: 3px solid rgba(59, 130, 246, 0.3); 
    outline-offset: 2px; 
}

.form-group input:focus { 
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 8px 24px rgba(30, 64, 175, 0.15);
}

/* ======================================
   CORREÇÕES MOBILE - TELA DE LOGIN
   ====================================== */
@media screen and (max-width: 768px) {
    body {
        min-height: 100vh;
        min-height: -webkit-fill-available;
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
    
    .login-container {
        width: 100%;
        max-width: 100%;
        padding: 16px;
        box-sizing: border-box;
    }
    
    .login-form {
        width: 100%;
        max-width: 100%;
        padding: 32px 24px;
        box-sizing: border-box;
    }
    
    /* Labels - Corrigir alinhamento */
    .form-group {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .form-group label {
        display: block;
        width: 100%;
        text-align: left;
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: 500;
        color: var(--text-color);
    }
    
    /* Inputs - Largura total */
    .input-container {
        width: 100%;
    }
    
    .form-group input {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px; /* Evita zoom no iOS */
        padding: 14px 45px 14px 45px;
        height: 50px;
    }
    
    /* Ícones dos inputs */
    .input-icon {
        left: 14px;
        font-size: 16px;
    }
    
    .password-toggle {
        right: 14px;
        font-size: 16px;
    }
    
    /* Opções de login - Lembrar-me e Esqueceu senha */
    .login-options {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin: 20px 0;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    /* Checkbox Lembrar-me */
    .remember-me {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .custom-checkbox {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    
    .checkbox-custom {
        width: 20px;
        height: 20px;
    }
    
    .remember-me span {
        white-space: nowrap;
    }
    
    /* Link Esqueceu a senha */
    .forgot-password {
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Botão de login */
    button[type="submit"] {
        width: 100%;
        height: 54px;
        font-size: 16px;
        padding: 14px 20px;
        margin-top: 10px;
    }
    
    /* Logo */
    .login-logo {
        max-width: 160px;
        margin-bottom: 16px;
    }
    
    /* Títulos */
    .login-form h2 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .login-form p {
        font-size: 14px;
        margin-bottom: 20px;
    }
}

/* Telas muito pequenas */
@media screen and (max-width: 375px) {
    .login-form {
        padding: 24px 18px;
    }
    
    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    
    .forgot-password {
        align-self: flex-end;
    }
    
    .form-group input {
        padding: 12px 40px 12px 40px;
        height: 48px;
    }
    
    .input-icon {
        left: 12px;
        font-size: 14px;
    }
    
    .password-toggle {
        right: 12px;
        font-size: 14px;
    }
    
    button[type="submit"] {
        height: 50px;
        font-size: 15px;
    }
}