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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0a1a3a 0%, #1a3f7a 50%, #2563eb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

/* Efeito de fundo dinâmico */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 35%);
    pointer-events: none;
}

/* Container principal - lados IGUAIS */
.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Ambos com mesma largura */
    max-width: 1200px;
    width: 100%;
    min-height: 600px;
    max-height: 700px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 40px;
    box-shadow: 
        0 50px 100px -30px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    overflow: hidden;
    animation: slideIn 0.6s ease-out;
}

/* Lado esquerdo - mesmas dimensões do direito */
.login-left {
    background: linear-gradient(135deg, rgba(10, 26, 58, 0.98), rgba(26, 63, 122, 0.98));
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: rotate 30s linear infinite;
}

.left-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    height: 100%;
    max-height: 600px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

/* Scrollbar personalizada */
.left-content::-webkit-scrollbar {
    width: 4px;
}

.left-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.left-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

/* Logo */
.logo-wrapper {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.left-logo {
    width: 90px;
    height: 90px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 
        0 20px 40px -10px rgba(0, 0, 0, 0.5),
        0 0 0 3px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: floatLogo 3s ease-in-out infinite;
}

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

.left-logo:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 
        0 30px 50px -10px rgba(37, 99, 235, 0.6),
        0 0 0 3px rgba(255, 255, 255, 0.4);
}

/* Títulos */
.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, #fff, #a5b4fc, #90caf9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    width: 100%;
}

.welcome-subtitle {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.95);
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0.8rem;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(3px);
    border-color: rgba(255, 255, 255, 0.3);
}

.feature-item i {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #90caf9;
    font-size: 0.8rem;
}

/* Depoimento */
.testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    margin: 0 auto;
}

.testimonial i {
    color: #90caf9;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    opacity: 0.5;
}

.testimonial p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
}

.testimonial-author strong {
    color: white;
    font-size: 0.9rem;
}

.testimonial-author span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* Lado direito - mesmas dimensões do esquerdo */
.login-right {
    background: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    overflow-y: auto;
}

.login-right::-webkit-scrollbar {
    width: 4px;
}

.login-right::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.login-right::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}

/* Cabeçalho do formulário */
.right-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #eef2f6;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 8px 15px -5px rgba(37, 99, 235, 0.3);
}

.right-header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, #0a1a3a, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* Formulário */
#loginForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-section {
    background: #f8fafd;
    border-radius: 20px;
    padding: 1.2rem;
    border: 1px solid #eef2f6;
}

.form-section h2 {
    font-size: 0.95rem;
    color: #0a1a3a;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h2 i {
    color: #2563eb;
    background: white;
    padding: 0.3rem;
    border-radius: 8px;
    font-size: 0.8rem;
    box-shadow: 0 3px 8px -3px rgba(37, 99, 235, 0.2);
}

/* Input groups */
.input-group {
    position: relative;
    margin-bottom: 0.8rem;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    z-index: 1;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.input-group:focus-within i {
    color: #2563eb;
}

input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: white;
}

input:focus {
    border-color: #2563eb;
    box-shadow: 0 5px 15px -5px rgba(37, 99, 235, 0.3);
    outline: none;
}

/* Remember me e forgot */
.remember-forgot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.85rem;
    cursor: pointer;
}

.remember-checkbox input[type="checkbox"] {
    width: auto;
    accent-color: #2563eb;
}

.forgot-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Botão de login */
.login-btn {
    background: linear-gradient(135deg, #0a1a3a, #2563eb);
    color: white;
    border: none;
    padding: 0.9rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -8px #2563eb;
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Seção social */
.social-section {
    margin-top: 1.2rem;
}

.divider {
    position: relative;
    text-align: center;
    margin: 0.8rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}

.divider span {
    background: white;
    padding: 0 0.8rem;
    color: #64748b;
    font-size: 0.8rem;
    position: relative;
    z-index: 2;
}

.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    color: white;
    min-height: 48px;
    letter-spacing: 0.01em;
}

.social-btn i {
    font-size: 1.05rem;
}

.social-btn.google {
    background: #4285f4;
    box-shadow: 0 4px 14px rgba(66, 133, 244, 0.35);
}

.social-btn.google:hover {
    background: #3367d6;
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.5);
    transform: translateY(-2px);
}

.social-btn.facebook {
    background: #1877f2;
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.35);
}

.social-btn.facebook:hover {
    background: #1464d8;
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.5);
    transform: translateY(-2px);
}

/* Logo mobile (visível apenas em mobile) */
.mobile-brand {
    display: none;
}

/* Link de registro */
.register-link {
    text-align: center;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

.register-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
}

.register-link a:hover {
    color: #1e40af;
    gap: 0.5rem;
}

/* Animações */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ========== RESPONSIVIDADE PERFEITA ========== */

/* Notebooks e telas médias (1366px - 1024px) */
@media (max-width: 1366px) and (min-width: 1025px) {
    .login-container {
        max-width: 1100px;
        min-height: 550px;
    }
    
    .left-logo {
        width: 80px;
        height: 80px;
    }
    
    .welcome-title {
        font-size: 1.8rem;
    }
    
    .features-grid {
        gap: 0.6rem;
    }
    
    .feature-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.7rem;
    }
}

/* Notebooks pequenos (1024px - 901px) */
@media (max-width: 1024px) and (min-width: 901px) {
    .login-container {
        max-width: 950px;
        min-height: 500px;
    }
    
    .left-logo {
        width: 70px;
        height: 70px;
    }
    
    .welcome-title {
        font-size: 1.6rem;
    }
    
    .welcome-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        max-width: 250px;
    }
    
    .testimonial {
        display: none; /* Remove depoimento em telas menores */
    }
    
    .login-right {
        padding: 1.5rem;
    }
    
    .right-header h1 {
        font-size: 1.2rem;
    }
}

/* Tablets (900px - 769px) */
@media (max-width: 900px) and (min-width: 769px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        min-height: auto;
        max-height: none;
    }

    .login-left {
        display: none;
    }

    .login-right {
        padding: 2rem;
        border-radius: 32px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1.5px solid #eef2f6;
    }

    .mobile-brand-logo {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        object-fit: cover;
        box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.35);
    }

    .mobile-brand-info {
        display: flex;
        flex-direction: column;
        line-height: 1.3;
    }

    .mobile-brand-info strong {
        font-size: 1rem;
        font-weight: 700;
        background: linear-gradient(135deg, #0a1a3a, #2563eb);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .mobile-brand-info small {
        font-size: 0.75rem;
        color: #94a3b8;
    }
}

/* Celulares grandes (768px - 481px) */
@media (max-width: 768px) and (min-width: 481px) {
    body {
        padding: 0.75rem;
        align-items: flex-start;
        padding-top: 1.5rem;
    }

    .login-container {
        grid-template-columns: 1fr;
        max-width: 440px;
        min-height: auto;
        max-height: none;
        border-radius: 28px;
    }

    .login-left {
        display: none;
    }

    .login-right {
        padding: 1.75rem;
        border-radius: 28px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
        border-bottom: 1.5px solid #eef2f6;
    }

    .mobile-brand-logo {
        width: 42px;
        height: 42px;
        border-radius: 11px;
        object-fit: cover;
        box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.35);
    }

    .mobile-brand-info {
        display: flex;
        flex-direction: column;
        line-height: 1.3;
    }

    .mobile-brand-info strong {
        font-size: 0.95rem;
        font-weight: 700;
        background: linear-gradient(135deg, #0a1a3a, #2563eb);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .mobile-brand-info small {
        font-size: 0.72rem;
        color: #94a3b8;
    }

    .social-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    input {
        border-radius: 16px;
    }

    .form-section {
        border-radius: 22px;
    }
}

/* Celulares pequenos (480px ou menos) */
@media (max-width: 480px) {
    body {
        padding: 1rem 0.75rem;
        align-items: center;
    }

    .login-container {
        grid-template-columns: 1fr;
        max-width: 100%;
        min-height: auto;
        max-height: none;
        border-radius: 28px;
    }

    .login-left {
        display: none;
    }

    .login-right {
        padding: 1.5rem 1.25rem;
        border-radius: 28px;
        justify-content: center;
    }

    /* Logo + marca no topo mobile */
    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
        border-bottom: 1.5px solid #eef2f6;
    }

    .mobile-brand-logo {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        object-fit: cover;
        box-shadow: 0 6px 18px -4px rgba(37, 99, 235, 0.4);
    }

    .mobile-brand-info {
        display: flex;
        flex-direction: column;
        line-height: 1.3;
    }

    .mobile-brand-info strong {
        font-size: 0.95rem;
        font-weight: 700;
        background: linear-gradient(135deg, #0a1a3a, #2563eb);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .mobile-brand-info small {
        font-size: 0.72rem;
        color: #94a3b8;
    }

    .right-header {
        margin-bottom: 1rem;
    }

    .right-header h1 {
        font-size: 1.1rem;
    }

    .form-section {
        padding: 1rem;
        border-radius: 20px;
    }

    .form-section h2 {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    input {
        padding: 0.75rem 1rem 0.75rem 2.6rem;
        font-size: 0.88rem;
        border-radius: 16px;
        min-height: 48px;
    }

    .login-btn {
        min-height: 50px;
        font-size: 0.95rem;
    }

    .social-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .social-btn {
        min-height: 48px;
        font-size: 0.83rem;
        padding: 0.7rem 0.5rem;
    }

    .social-section {
        margin-top: 1rem;
    }

    .register-link {
        flex-direction: column;
        gap: 0.3rem;
        font-size: 0.85rem;
        margin-top: 1rem;
    }

    .register-link a {
        font-size: 0.88rem;
        padding: 0.4rem 1rem;
        background: #eff6ff;
        border-radius: 30px;
        color: #2563eb;
    }
}

/* Telas muito grandes (acima de 1920px) */
@media (min-width: 1921px) {
    .login-container {
        max-width: 1400px;
        min-height: 800px;
    }
    
    .left-logo {
        width: 120px;
        height: 120px;
    }
    
    .welcome-title {
        font-size: 2.5rem;
    }
    
    .feature-item {
        font-size: 1rem;
        padding: 0.7rem 1rem;
    }
    
    .login-right {
        padding: 3rem;
    }
    
    .right-header h1 {
        font-size: 1.8rem;
    }
    
    input {
        padding: 1rem 1rem 1rem 3rem;
        font-size: 1rem;
    }
}

/* Landscape em celulares */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        align-items: flex-start;
        padding: 0.5rem;
    }

    .login-container {
        min-height: auto;
        border-radius: 20px;
    }

    .login-left {
        display: none;
    }

    .login-right {
        padding: 1rem 1.25rem;
        min-height: auto;
        justify-content: center;
    }

    .mobile-brand {
        display: none;
    }

    .form-section {
        padding: 0.75rem 1rem;
        border-radius: 16px;
    }

    .social-section {
        margin-top: 0.75rem;
    }

    .divider {
        margin: 0.5rem 0;
    }

    .social-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .social-btn {
        min-height: 42px;
        padding: 0.5rem;
        font-size: 0.82rem;
    }

    .register-link {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}