/* Login Page Styles */
.login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    position: relative;
}

/* Left Side - Branding */
.login-brand {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.brand-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.logo-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo-icon-large {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 20px;
    margin-bottom: 1rem;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.logo-icon-large:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
}

.logo-icon-large i {
    font-size: 2.5rem;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.brand-name-large {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.brand-tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    opacity: 0.9;
}

.brand-feature i {
    color: white;
    font-size: 1.2rem;
    width: 20px;
}

.business-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.business-info h3 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.business-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.business-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.business-feature:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.business-feature i {
    color: #10b981;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.business-feature div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.business-feature strong {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
}

.business-feature span {
    color: #d1d5db;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Right Side - Login Form */
.login-form-container {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.login-form-content {
    width: 100%;
    max-width: 400px;
}

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

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--secondary-color);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 209, 199, 0.1);
}

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 12px;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    margin-top: 12px;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-200);
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 209, 199, 0.3);
}

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

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.login-footer p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.back-to-home a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-to-home a:hover {
    color: var(--primary-color);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 1rem;
    margin: 0;
}

/* Error States */
.form-group.error input,
.form-group.error select {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.error-message {
    color: #e53e3e;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Success States */
.form-group.success input,
.form-group.success select {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .login-brand {
        padding: 1.5rem 1rem;
        min-height: auto;
    }
    
    .brand-content {
        text-align: center;
    }
    
    .logo-large {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .brand-name-large {
        font-size: 1.75rem;
    }
    
    .brand-tagline {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .brand-features {
        display: none;
    }
    
    .cnpj-info {
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .cnpj-info h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .cnpj-item {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .cnpj-item i {
        font-size: 1rem;
    }
    
    .cnpj-item strong {
        font-size: 0.9rem;
    }
    
    .cnpj-item span {
        font-size: 0.8rem;
    }
    
    .login-form-container {
        padding: 2rem 1rem;
    }
    
    .login-form-content {
        max-width: 100%;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    /* Melhorias para ícones em campos de entrada */
    .form-group i {
        font-size: 0.9rem;
        left: 0.875rem;
    }
    
    .password-toggle {
        right: 0.875rem;
        font-size: 0.9rem;
        padding: 0.375rem;
    }
    
    /* Melhorias para botões em mobile */
     .btn {
         width: 100%;
         padding: 1rem;
         font-size: 1rem;
         justify-content: center;
     }
    
    .form-group input,
    .form-group select {
        padding: 1rem 2.5rem 1rem 2.5rem;
        font-size: 1rem;
    }
    
    .login-form {
        gap: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .login-brand {
        padding: 1.5rem 1rem;
    }
    
    .brand-name-large {
        font-size: 1.8rem;
    }
    
    .login-form-container {
        padding: 1.5rem 1rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    /* Melhorias específicas para smartphones */
    .login-container {
        padding: 0;
        margin: 0;
    }
    
    .btn {
        padding: 0.875rem;
        font-size: 0.95rem;
        min-height: 48px;
    }
    
    .form-group input,
    .form-group select {
        padding: 0.875rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .login-form {
        gap: 1.25rem;
    }
    
    .error-message {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}

/* Animation for form elements */
.form-group {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-options { animation-delay: 0.4s; }
.btn-login { animation-delay: 0.5s; }

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

/* Focus trap for accessibility */
.login-form input:focus,
.login-form select:focus,
.login-form button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-group input,
    .form-group select {
        border-width: 3px;
    }
    
    .btn-login {
        border: 3px solid var(--primary-dark);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .form-group,
    .btn-login,
    .spinner,
    .login-brand::before {
        animation: none;
    }
    
    .btn-login:hover {
        transform: none;
    }
}