/* Login Moderno - Festor CRM */
:root {
    --primary: #6166CC;
    --primary-dark: #4f54b8;
    --primary-light: #8b90e8;
    --secondary: #A78BFA;
    --accent: #FF8C16;
    --dark-bg: #1e1e2e;
    --light-bg: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Container Principal */
.login-container-modern {
    width: 100%;
    min-height: 100vh;
    display: flex;
    background: var(--light-bg);
    box-shadow: var(--shadow-xl);
}

/* Lado Esquerdo - Showcase */
.login-showcase {
    flex: 1;
    background: #6166CC;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-showcase::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: movePattern 20s linear infinite;
    opacity: 0.3;
}

@keyframes movePattern {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.showcase-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
    width: 100%;
}

.showcase-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

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

.showcase-logo i {
    font-size: 3.5rem;
    color: white;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.showcase-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.showcase-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 400;
}

/* Cards de Benefícios */
.benefits-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.benefit-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    cursor: default;
}

.benefit-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.benefit-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-icon i {
    font-size: 1.5rem;
    color: white;
}

.benefit-content {
    flex: 1;
}

.benefit-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.benefit-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Lado Direito - Formulário */
.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--gray-50);
    position: relative;
}

.login-form-wrapper {
    width: 100%;
    max-width: 450px;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-logo {
    height: 80px;
    margin-bottom: 1.5rem;
}

.form-title {
    color: var(--gray-900);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--gray-500);
    font-size: 1rem;
}

/* Formulário */
.login-form {
    background: white;
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

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

.form-label {
    display: block;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 1rem;
    color: var(--gray-900);
    background: white;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1.25rem;
    pointer-events: none;
    transition: var(--transition);
}

.form-input:focus ~ .input-icon {
    color: var(--primary);
}

/* Toggle de Senha */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1.25rem;
    transition: var(--transition);
    background: none;
    border: none;
    padding: 0.25rem;
}

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

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

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    cursor: pointer;
}

.form-checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

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

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

/* Botão de Login */
.btn-login-modern {
    width: 100%;
    padding: 1rem;
    background: #FF8C16;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-login-modern:hover {
    transform: translateY(-2px);
    background: #e57a0f;
    box-shadow: 0 10px 20px rgba(255, 140, 22, 0.3);
}

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

.btn-login-modern.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login-modern .spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

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

/* Separador */
.form-separator {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.form-separator::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--gray-200);
}

.separator-text {
    background: white;
    padding: 0 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

/* Link de Cadastro */
.register-section {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.register-text {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.btn-register {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-register:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.trial-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--success);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Footer de Segurança */
.security-footer {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.security-icon {
    color: var(--success);
}

/* Alertas */
.alert-modern {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-modern.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.alert-modern.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.alert-modern.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.alert-modern.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.alert-icon {
    font-size: 1.25rem;
}

.alert-content {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
}

.alert-close:hover {
    opacity: 1;
}

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

    .login-form-section {
        background: #6166CC;
    }

    .login-form-wrapper {
        max-width: 400px;
    }

    .login-form {
        box-shadow: var(--shadow-xl);
    }
}

@media (max-width: 480px) {
    .login-form-section {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 0.5rem;
        min-height: auto;
    }

    .login-form-wrapper {
        margin-top: 0;
        padding-top: 0;
    }

    .login-form {
        padding: 1.5rem;
        margin-top: 0;
    }

    .form-header {
        margin-bottom: 1rem;
        margin-top: 0;
        padding-top: 0;
    }

    .form-logo {
        height: 50px;
        margin-bottom: 0.5rem;
        margin-top: 0;
    }

    .form-title {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .form-subtitle {
        font-size: 0.875rem;
    }

    .showcase-title {
        font-size: 1.75rem;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Animações extras */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}