/* Reset e Configurações Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-black: #000000;
    --secondary-black: #1a1a1a;
    --gray-dark: #333333;
    --gray-medium: #666666;
    --gray-light: #999999;
    --gray-lighter: #e5e5e5;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --accent-color: #2c2c2c;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--off-white);
    color: var(--gray-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container Principal */
.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Seção de Login (Lado Esquerdo) */
.login-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--white);
    position: relative;
    z-index: 2;
}

.login-content {
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    width: 320px;
    height: auto;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

/* Texto de Boas-vindas */
.welcome-text {
    text-align: center;
    margin-bottom: 2.5rem;
}

.welcome-text h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.welcome-text p {
    font-size: 0.95rem;
    color: var(--gray-medium);
    font-weight: 400;
}

/* Formulário */
.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--gray-light);
    pointer-events: none;
    transition: var(--transition);
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: 0.95rem;
    border: 2px solid var(--gray-lighter);
    border-radius: 12px;
    background-color: var(--white);
    color: var(--gray-dark);
    transition: var(--transition);
    font-family: inherit;
}

.input-wrapper input::placeholder {
    color: var(--gray-light);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-black);
    background-color: var(--white);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: var(--primary-black);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--gray-light);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.eye-icon {
    width: 20px;
    height: 20px;
}

/* Opções do Formulário */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-lighter);
    border-radius: 4px;
    margin-right: 0.5rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-container:hover .checkmark {
    border-color: var(--gray-medium);
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark {
    background-color: var(--primary-black);
    border-color: var(--primary-black);
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--gray-dark);
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--gray-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Botão de Login */
.btn-login {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-black);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-login::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;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    background-color: var(--secondary-black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.arrow-icon {
    transition: var(--transition);
}

.btn-login:hover .arrow-icon {
    transform: translateX(4px);
}

/* Link de Cadastro */
.signup-link {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-medium);
    margin-top: 2rem;
}

.signup-link a {
    color: var(--primary-black);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Seção de Branding (Lado Direito) */
.branding-section {
    flex: 1;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.branding-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

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

.branding-content {
    position: relative;
    z-index: 1;
    padding: 3rem;
    max-width: 600px;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.branding-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.branding-text p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    line-height: 1.6;
}

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

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    font-size: 1rem;
    animation: slideInRight 0.6s ease-out backwards;
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.3s; }
.feature-item:nth-child(3) { animation-delay: 0.4s; }
.feature-item:nth-child(4) { animation-delay: 0.5s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-item svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    stroke: var(--white);
}

/* Responsividade */
@media (max-width: 1024px) {
    .branding-section {
        display: none;
    }
    
    .login-section {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .login-section {
        padding: 1.5rem;
    }
    
    .login-content {
        max-width: 100%;
    }
    
    .logo {
        width: 240px;
    }
    
    .welcome-text h1 {
        font-size: 1.75rem;
    }
}

/* Estados de Validação */
.input-wrapper.error input {
    border-color: var(--error-color);
}

.input-wrapper.success input {
    border-color: var(--success-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Loading State */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-login.loading span {
    opacity: 0;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--off-white);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-medium);
}
