/* assets/css/login.css */
:root {
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --primary-light: #5ca0f2;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-1: linear-gradient(135deg, #4a90e2, #357abd);
    --gradient-2: linear-gradient(135deg, #5ca0f2, #4a90e2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: var(--gradient-1);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 15s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 10%;
    animation-delay: 7s;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -10px) rotate(90deg); }
    50% { transform: translate(0, -20px) rotate(180deg); }
    75% { transform: translate(-10px, -10px) rotate(270deg); }
}

/* Login Wrapper */
.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 700px;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.8s ease-out;
}

/* Login Container */
.login-container {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    min-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
}

.logo-circle {
    width: 100%;
    height: 100%;
    background: var(--gradient-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
    animation: pulse 2s infinite ease-in-out;
}

.logo-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
    letter-spacing: -1px;
}

.logo-title span {
    color: var(--primary-color);
}

.logo-subtitle {
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.5s ease-out;
}

.alert i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert span {
    flex: 1;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    color: var(--success-color);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    color: var(--warning-color);
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: var(--danger-color);
}

/* Login Form */
.login-form {
    margin-bottom: 30px;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 1.1rem;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-color);
    background: var(--light-color);
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.1);
}

.input-group input.input-error {
    border-color: var(--danger-color);
    animation: shake 0.5s ease-in-out;
}

.input-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.password-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--secondary-color);
    user-select: none;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.checkbox-label:hover .checkmark {
    border-color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 20px;
    background: var(--gradient-2);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.4);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-text {
    transition: opacity 0.3s ease;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-login.loading .btn-text {
    opacity: 0;
}

.btn-login.loading .btn-loader {
    display: flex;
}

/* Blocked Info */
.blocked-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 12px;
    margin-top: 20px;
    color: var(--danger-color);
    font-size: 0.9rem;
}

/* Demo Credentials */
.demo-credentials {
    background: rgba(74, 144, 226, 0.05);
    border: 2px dashed rgba(74, 144, 226, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.demo-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
}

.demo-content {
    display: grid;
    gap: 10px;
}

.demo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.demo-item span {
    color: var(--secondary-color);
}

.demo-item code {
    background: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: var(--dark-color);
    border: 1px solid var(--border-color);
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.version {
    font-size: 0.8rem !important;
    opacity: 0.6;
}

/* Login Decoration */
.login-decoration {
    flex: 1;
    background: var(--gradient-1);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
    min-width: 400px;
}

.login-decoration::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 1440 320"><path fill="rgba(255,255,255,0.1)" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1052,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    opacity: 0.1;
}

.decoration-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: 0 auto;
}

.decoration-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.decoration-content > p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.6;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.feature i {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.feature p {
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 1024px) {
    .login-wrapper {
        flex-direction: column;
        max-width: 600px;
        min-height: auto;
    }
    
    .login-container {
        min-width: auto;
        padding: 40px 30px;
    }
    
    .login-decoration {
        min-width: auto;
        padding: 40px 30px;
        display: none; /* Pode remover se quiser mostrar em mobile */
    }
    
    .logo-title {
        font-size: 2.2rem;
    }
    
    .decoration-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .login-wrapper {
        border-radius: 20px;
    }
    
    .login-container {
        padding: 30px 20px;
    }
    
    .logo-title {
        font-size: 1.8rem;
    }
    
    .logo-circle {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .input-group input {
        padding: 16px 20px 16px 50px;
        font-size: 0.95rem;
    }
    
    .input-icon {
        left: 15px;
    }
    
    .btn-login {
        padding: 18px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .demo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Print Styles */
@media print {
    .login-wrapper {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .login-decoration {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .input-group input {
        border-width: 3px;
    }
    
    .btn-login {
        border: 2px solid white;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}