/* Login Page Styles - Consistente com o design do sistema */
:root {
    --primary-color: #687ae4;
    --primary-dark: #687ae4;
    --success-color: #22c55e;
    --gradient-primary: linear-gradient(135deg, #687ae4 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #89f7fe 0%, #687ae4 100%);
    --shadow-light: 0 2px 12px 0 rgba(44,62,80,0.07);
    --shadow-medium: 0 4px 24px 0 rgba(44,62,80,0.1);
    --shadow-heavy: 0 8px 32px 0 rgba(44,62,80,0.15);
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

/* Body e HTML específicos para login */
body.login-body,
html.login-html {
    height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-primary);
    background-attachment: fixed;
    overflow: hidden;
}

/* Partículas animadas de fundo */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: var(--gradient-primary);
    overflow: hidden;
}

.login-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.login-background::after {
    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: rotate 30s linear infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Container principal do login */
.login-page-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Header do login com logo */
.login-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.login-brand:hover {
    color: #a7f3d0;
    transform: translateY(-2px);
}

.login-brand-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: var(--shadow-medium);
}

.login-brand-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.login-brand-text small {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: -2px;
    display: block;
}

/* Card principal */
.login-content-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 500px;
    margin: 80px auto 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Container do formulário */
.login-container {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 166, 255, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
    pointer-events: none;
}

.login-form {
    width: 100%;
    max-width: 350px;
    position: relative;
    z-index: 2;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1e293b;
    font-weight: 700;
    font-size: 2rem;
    position: relative;
}

.login-form h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

/* Grupos de input melhorados */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    background: none;
}

.input-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.2rem;
    z-index: 2;
    transition: var(--transition);
    pointer-events: none;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(248, 250, 252, 0.8);
    color: #334155;
    transition: var(--transition);
    outline: none;
}

.input-group input:focus {
    border-color: #687ae4;
    background: white;
    box-shadow: 0 0 0 3px rgba(104, 122, 228, 0.1);
    transform: translateY(-2px);
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    color: #687ae4;
    transform: translateY(-50%) scale(1.1);
}

/* Botão de submit melhorado */
.btn-login {
    width: 100%;
    padding: 15px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

/* Informações legais no formulário de login */
.login-footer-info {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #394867;
}

.legal-links-login {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.legal-link-login {
    color: #64748b;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 4px 6px;
    border-radius: 4px;
}

.legal-link-login:hover {
    color: #687ae4;
    background: rgba(104, 122, 228, 0.05);
}

.separator {
    color: #cbd5e1;
    font-size: 0.7rem;
    user-select: none;
}

.copyright-login {
    color: #94a3b8;
    font-size: 0.7rem;
}

.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 {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(104, 122, 228, 0.4);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:active {
    transform: translateY(0);
}

/* Mensagens de erro */
.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #dc2626;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Painel lateral de informações */
.login-info-panel {
    flex: 0 0 400px;
    background: linear-gradient(135deg, #f8fbff 0%, #e0f2fe 100%);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border-left: 1px solid rgba(104, 122, 228, 0.2);
}

.login-info-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(104,122,228,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    pointer-events: none;
}

.info-content {
    position: relative;
    z-index: 2;
}

.system-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.system-logo .logo-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    margin: 0 auto 15px;
    box-shadow: var(--shadow-heavy);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.system-title {
    color: #1e293b;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.system-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Lista de recursos */
.features-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
}

.features-list li i {
    width: 30px;
    height: 30px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    font-size: 14px;
}

/* Badge de versão */
.version-badge {
    text-align: center;
    margin: 2rem 0 1.5rem;
}

.version-badge .badge {
    background: var(--gradient-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-light);
}

/* Botão de voltar */
.back-button {
    background: rgba(104, 122, 228, 0.1);
    color: #687ae4;
    border: 1px solid rgba(104, 122, 228, 0.3);
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover {
    background: #687ae4;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Responsividade */
@media (max-width: 768px) {
    .login-content-box {
        flex-direction: column;
        margin-top: 100px;
        margin-bottom: 100px;
        max-width: 450px;
        border-radius: 20px;
    }
    
    .login-info-panel {
        flex: none;
        order: -1;
        padding: 30px 20px;
        border-left: none;
        border-bottom: 1px solid rgba(104, 122, 228, 0.2);
    }
    
    .login-container {
        padding: 40px 20px;
    }
    
    .login-form h2 {
        font-size: 1.6rem;
    }
    
    .system-title {
        font-size: 1.4rem;
    }
    
    .features-list li {
        font-size: 0.8rem;
    }
    
    .legal-links-login {
        flex-direction: column;
        gap: 4px;
    }
    
    .separator {
        display: none;
    }
    
    .legal-link-login {
        font-size: 0.7rem;
    }
    
    .login-header,
    .login-footer {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-page-wrapper {
        padding: 10px;
    }
    
    .login-container {
        padding: 30px 15px;
    }
    
    .login-info-panel {
        padding: 20px 15px;
    }
    
    .input-group input {
        padding: 12px 12px 12px 45px;
    }
    
    .btn-login {
        padding: 12px;
    }
}