/**
 * Custom Login Theme - Estilos Personalizados
 * Tema moderno para telas de login do Perfex CRM
 */

/* ============================================
   Estilos Gerais
   ============================================ */

.modern-input-group {
    position: relative;
}

.modern-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #334155;
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: all 0.2s ease-in-out;
    outline: none;
}

.modern-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.modern-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    z-index: 10;
}

/* ============================================
   Botões Primários
   ============================================ */

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-primary:active {
    transform: translateY(0) !important;
}

.btn-primary-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
}

.btn-primary-green:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-primary-green:active {
    transform: translateY(0) !important;
}

/* ============================================
   Checkbox Customizado
   ============================================ */

.custom-checkbox input:checked + div {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.custom-checkbox input:checked ~ div svg {
    display: block !important;
}

/* Para a versão verde (cliente) */
.btn-primary-green ~ .custom-checkbox input:checked + div {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
}

/* ============================================
   Notificações Flutuantes (Glass Effect)
   ============================================ */

.notification-card {
    animation: slideInFromLeft 0.5s ease-out;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ============================================
   Responsividade
   ============================================ */

@media (max-width: 1024px) {
    .modern-input {
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        font-size: 0.875rem;
    }

    .input-icon {
        left: 0.875rem;
    }
}

@media (max-width: 640px) {
    .modern-input {
        padding: 0.625rem 0.875rem 0.625rem 2.25rem;
        font-size: 0.8125rem;
    }

    .input-icon {
        left: 0.75rem;
    }
}

/* ============================================
   Animações Suaves
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.space-y-8 > * {
    animation: fadeIn 0.6s ease-out;
}

.space-y-8 > *:nth-child(1) {
    animation-delay: 0.1s;
}

.space-y-8 > *:nth-child(2) {
    animation-delay: 0.2s;
}

.space-y-8 > *:nth-child(3) {
    animation-delay: 0.3s;
}

/* ============================================
   Ajustes para reCAPTCHA
   ============================================ */

.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

/* ============================================
   Select customizado
   ============================================ */

select.modern-input {
    padding-right: 2.5rem;
    cursor: pointer;
    appearance: none;
}

select.modern-input::-ms-expand {
    display: none;
}

/* ============================================
   Links e Textos
   ============================================ */

a {
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

/* ============================================
   Ajustes para alertas do Perfex
   ============================================ */

.alert {
    border-radius: 0.75rem !important;
    border-width: 1px !important;
    padding: 0.875rem 1rem !important;
    font-weight: 500 !important;
}

.alert-danger {
    background-color: #fef2f2 !important;
    border-color: #fee2e2 !important;
    color: #dc2626 !important;
}

.alert-success {
    background-color: #f0fdf4 !important;
    border-color: #dcfce7 !important;
    color: #16a34a !important;
}

.alert-warning {
    background-color: #fffbeb !important;
    border-color: #fef3c7 !important;
    color: #d97706 !important;
}

.alert-info {
    background-color: #eff6ff !important;
    border-color: #dbeafe !important;
    color: #2563eb !important;
}

/* ============================================
   Prevenção de flash de conteúdo não estilizado
   ============================================ */

html {
    opacity: 0;
    animation: fadeInPage 0.3s ease-in forwards;
}

@keyframes fadeInPage {
    to {
        opacity: 1;
    }
}
