/* ============================================
   LOGIN-STYLE.CSS - Correção dos campos
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #0a0a0f;
    color: #fff;
}

/* ============================================
   FUNDO COM EFEITO
   ============================================ */

.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.login-bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 40%, #16213e 70%, #0a0a0f 100%);
}

.login-bg-particles {
    position: absolute;
    inset: 0;
}

.login-bg-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(52, 152, 219, 0.3);
    border-radius: 50%;
    animation: float-particle 20s infinite linear;
}

.login-bg-particles span:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 18s; }
.login-bg-particles span:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 22s; width: 6px; height: 6px; }
.login-bg-particles span:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 16s; }
.login-bg-particles span:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 20s; width: 8px; height: 8px; background: rgba(52, 152, 219, 0.15); }
.login-bg-particles span:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 24s; }
.login-bg-particles span:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 19s; width: 5px; height: 5px; }
.login-bg-particles span:nth-child(7) { left: 70%; animation-delay: 2s; animation-duration: 21s; }
.login-bg-particles span:nth-child(8) { left: 80%; animation-delay: 4s; animation-duration: 17s; width: 7px; height: 7px; background: rgba(52, 152, 219, 0.1); }
.login-bg-particles span:nth-child(9) { left: 90%; animation-delay: 1s; animation-duration: 23s; }
.login-bg-particles span:nth-child(10) { left: 15%; animation-delay: 3s; animation-duration: 25s; width: 3px; height: 3px; }
.login-bg-particles span:nth-child(11) { left: 45%; animation-delay: 5s; animation-duration: 18s; }
.login-bg-particles span:nth-child(12) { left: 75%; animation-delay: 2s; animation-duration: 20s; width: 9px; height: 9px; background: rgba(52, 152, 219, 0.08); }

@keyframes float-particle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    height: 100%;
    max-height: 700px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

/* ============================================
   LADO ESQUERDO - BRAND
   ============================================ */

.login-brand-section {
    flex: 1.2;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.12), rgba(41, 128, 185, 0.05));
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.login-brand-logo {
    margin-bottom: 10px;
}

.brand-logo-img {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

.login-brand-title {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff, #74b9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
}

.login-brand-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.login-brand-divider {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, transparent);
    border-radius: 2px;
    margin: 18px 0 16px;
}

.login-brand-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    font-weight: 300;
}

.login-brand-features {
    display: flex;
    gap: 30px;
    margin-top: 25px;
}

.login-brand-features .feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.login-brand-features .feature i {
    font-size: 18px;
    color: #3498db;
}

.login-brand-footer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   LADO DIREITO - FORMULÁRIO (CORRIGIDO)
   ============================================ */

.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-card {
    width: 100%;
    max-width: 380px;
}

.login-mobile-header {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.login-mobile-header .mobile-logo {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

.login-mobile-header .mobile-brand {
    font-size: 22px;
    font-weight: 700;
    color: white;
}

.login-form-header {
    margin-bottom: 30px;
}

.login-form-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.login-form-header p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

/* ============================================
   INPUTS CORRIGIDOS
   ============================================ */

.form-group {
    margin-bottom: 18px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.input-group:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.input-group.focused {
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 0 16px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
    transition: color 0.3s ease;
    flex-shrink: 0;
    width: 44px;
}

.input-group.focused .input-icon {
    color: #3498db;
}

.input-group input {
    flex: 1;
    padding: 14px 16px 14px 4px;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none !important;
    width: 100%;
    min-width: 0;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

/* Remove estilos automáticos do navegador */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px rgba(20, 20, 40, 0.9) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
}

/* Campo de senha com botão toggle */
.password-field {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.password-field input {
    flex: 1;
    padding: 14px 0 14px 4px;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none !important;
    width: 100%;
    min-width: 0;
}

.toggle-password {
    flex-shrink: 0;
    padding: 0 16px 0 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
}

.toggle-password:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* Opções do formulário */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 22px 0 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.remember-me .checkmark {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.remember-me input:checked + .checkmark {
    background: #3498db;
    border-color: #3498db;
}

.remember-me input:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
}

.forgot-password {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #3498db;
}

/* Botão Login */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Divisor */
.login-divider {
    text-align: center;
    margin: 28px 0 20px;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.login-divider span {
    background: transparent;
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 12px;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contas Demo */
.demo-accounts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.demo-account {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 80px;
    justify-content: center;
}

.demo-account:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

.demo-account.selected {
    background: rgba(52, 152, 219, 0.15);
    border-color: #3498db;
}

.demo-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.demo-badge.admin { background: #e74c3c; color: white; }
.demo-badge.atendente { background: #2ecc71; color: white; }
.demo-badge.cliente { background: #3498db; color: white; }

.demo-email {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    font-weight: 400;
}

/* Alertas */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: shakeError 0.5s ease;
}

.alert.error {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.alert i {
    font-size: 16px;
}

/* Toast */
.welcome-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(52, 152, 219, 0.95);
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
    transform: translateX(calc(100% + 30px));
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 9999;
    backdrop-filter: blur(10px);
}

/* ============================================
   ANIMAÇÕES
   ============================================ */

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* ============================================
   RESPONSIVO
   ============================================ */

@media (max-width: 992px) {
    .login-container {
        max-height: none;
        height: auto;
        min-height: 100vh;
        border-radius: 16px;
    }

    .login-brand-section {
        flex: 0.8;
        padding: 35px 30px;
    }

    .login-brand-features {
        flex-wrap: wrap;
        gap: 15px;
    }

    .login-form-section {
        padding: 30px 25px;
    }

    .login-form-card {
        max-width: 340px;
    }
}

@media (max-width: 768px) {
    .login-wrapper {
        padding: 0;
    }

    .login-container {
        flex-direction: column;
        border-radius: 0;
        min-height: 100vh;
        max-height: none;
    }

    .login-brand-section {
        display: none;
    }

    .login-form-section {
        flex: 1;
        padding: 30px 24px;
        align-items: center;
        min-height: 100vh;
    }

    .login-form-card {
        max-width: 400px;
        padding: 0;
    }

    .login-mobile-header {
        display: flex;
    }

    .login-form-header h2 {
        font-size: 24px;
    }

    .login-form-header p {
        font-size: 14px;
    }

    .input-group input {
        font-size: 14px;
        padding: 12px 14px 12px 0;
    }

    .btn-login {
        font-size: 15px;
        padding: 14px;
    }

    .demo-account {
        padding: 6px 12px;
        font-size: 12px;
    }

    .demo-email {
        font-size: 10px;
    }

    .welcome-toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        font-size: 13px;
        padding: 12px 18px;
    }
}

@media (max-width: 480px) {
    .login-form-section {
        padding: 20px 16px;
    }

    .login-form-header h2 {
        font-size: 22px;
    }

    .input-group {
        border-radius: 10px;
    }

    .input-group input {
        padding: 11px 12px 11px 0;
        font-size: 13px;
    }

    .input-icon {
        padding: 0 0 0 12px;
        width: 36px;
        font-size: 14px;
    }

    .toggle-password {
        width: 36px;
        padding: 0 12px 0 0;
        font-size: 14px;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .demo-accounts {
        flex-direction: column;
        gap: 6px;
    }

    .demo-account {
        justify-content: center;
        padding: 8px;
    }

    .btn-login {
        font-size: 14px;
        padding: 13px;
    }

    .login-mobile-header .mobile-brand {
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .login-form-section {
        padding: 16px 12px;
    }

    .login-form-header h2 {
        font-size: 20px;
    }

    .login-form-header p {
        font-size: 12px;
    }

    .input-group input {
        padding: 10px 10px 10px 0;
        font-size: 12px;
    }

    .input-icon {
        padding: 0 0 0 8px;
        width: 32px;
        font-size: 12px;
    }

    .toggle-password {
        width: 32px;
        padding: 0 8px 0 0;
        font-size: 12px;
    }
}