/* ===== LOGIN PAGE STYLES ===== */
.auth-body {
    background: #142423;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.auth-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .auth-container {
        min-height: 100vh;
        padding: 0.5rem 0;
        align-items: flex-start;
        padding-top: 2rem;
    }
}

.auth-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.auth-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(41, 194, 100, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(36, 122, 220, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(41, 194, 100, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

.auth-logo-watermark {
    position: absolute;
    top: 50%;
    right: -10%;
    transform: translateY(-50%);
    opacity: 0.03;
    z-index: 1;
}

.watermark-logo {
    width: 600px;
    height: auto;
    filter: blur(2px);
}

.auth-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 2;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo {
    margin-bottom: 1rem;
}

.main-logo {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.auth-header h1 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #ffffff 0%, #e5e7eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 0;
    font-weight: 400;
}

.flash-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-message.error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #ff6b6b;
}

.flash-message.success {
    background: rgba(41, 194, 100, 0.1);
    border: 1px solid rgba(41, 194, 100, 0.3);
    color: #51cf66;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 0.875rem;
    }
    
    .form-row .form-group:last-child {
        margin-bottom: 0;
    }
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group label i {
    color: #29C264;
    width: 14px;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.form-group input::placeholder {
    color: #6b7280;
}

.form-group input:focus {
    outline: none;
    border-color: #29C264;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(41, 194, 100, 0.1);
}

/* Melhorias específicas para input de data no mobile */
input[type="date"] {
    position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Para Firefox */
input[type="date"]::-moz-calendar-picker-indicator {
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.btn-login {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #29C264 0%, #20c997 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(41, 194, 100, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px; /* Tamanho mínimo para touch */
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(41, 194, 100, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
}

.auth-footer p {
    color: #9ca3af;
    font-size: 0.8rem;
    margin: 0 0 0.75rem 0;
}

.auth-link {
    color: #29C264;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.auth-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.auth-copyright {
    color: #6b7280;
    font-size: 0.7rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        margin: 0;
        padding: 1.5rem;
        max-width: none;
        width: 100%;
        border-radius: 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-header p {
        font-size: 0.875rem;
    }
    
    .watermark-logo {
        width: 300px;
        right: -20%;
        opacity: 0.02;
    }
    
    .main-logo {
        width: 60px;
    }
    
    .form-group input {
        padding: 0.875rem;
        font-size: 16px; /* Previne zoom no iOS */
    }
    
    .btn-login {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .flash-message {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 0.5rem;
    }
    
    .auth-card {
        padding: 1.25rem;
        border-radius: 0.75rem;
    }
    
    .auth-header {
        margin-bottom: 1.25rem;
    }
    
    .auth-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .auth-header p {
        font-size: 0.8rem;
    }
    
    .main-logo {
        width: 50px;
    }
    
    .form-group {
        margin-bottom: 0.875rem;
    }
    
    .form-group label {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .form-group input {
        padding: 0.75rem;
        font-size: 16px; /* Previne zoom no iOS */
        border-radius: 0.5rem;
    }
    
    .form-group input::placeholder {
        font-size: 14px;
    }
    
    .btn-login {
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
        border-radius: 0.5rem;
    }
    
    .password-toggle {
        right: 0.5rem;
        padding: 0.25rem;
        font-size: 0.75rem;
    }
    
    .flash-message {
        padding: 0.625rem;
        font-size: 0.75rem;
        margin-bottom: 0.875rem;
    }
    
    .auth-footer p {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .auth-copyright {
        font-size: 0.65rem;
    }
    
    .watermark-logo {
        width: 200px;
        right: -30%;
        opacity: 0.01;
    }
}

@media (max-width: 360px) {
    .auth-container {
        padding: 0.25rem;
    }
    
    .auth-card {
        padding: 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.125rem;
    }
    
    .main-logo {
        width: 45px;
    }
    
    .form-group input {
        padding: 0.625rem;
    }
    
    .btn-login {
        padding: 0.625rem 1rem;
        font-size: 0.75rem;
    }
}
