body {
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

.sidebar {
    flex: 1;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.sidebar-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/background-lousa.jpg');  
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #5271FF;
    opacity: 0.80;
    z-index: 1;
}

.logo-container {
    z-index: 3;
    text-align: center;
}

.logo {
    width: 130px;
    height: auto;
    margin: 0 auto 20px;
}

.logo-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.logo-container p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 300px;
    margin: 0 auto;
}

.form-logo {
    width: 400px; 
    height: auto;
    margin: 0 auto 30px;
    display: block;
}

.login-form {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
}

.form-container {
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
}

h2 {
    text-align: center;
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 8px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #4361ee;
    outline: none;
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-container input {
    width: 100%;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #4361ee;
}

.toggle-password:focus {
    outline: none;
    color: #4361ee;
}

.eye-icon, .eye-off-icon {
    stroke: currentColor;
}

input.success {
    border-color: #4BB543;
    background-color: rgba(75, 181, 67, 0.05);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px; 
}

.remember-me input[type="checkbox"] {
    margin: 0; 
    vertical-align: middle; 
}

.remember-me label {
    margin: 0; 
    line-height: 1; 
}

.login-button {
    width: 100%;
    padding: 12px;
    background-color: #4361ee;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.login-button:hover {
    background-color: #3a0ca3;
}

.login-button i {
    margin-right: 8px;
}

.register-link {
    text-align: center;
    margin-top: 24px;
    color: #666;
}

.register-link a {
    color: #4361ee;
    text-decoration: none;
    font-weight: 500;
}

input.error {
    border-color: #e63946;
    background-color: rgba(230, 57, 70, 0.05);
}

.error-message {
    color: #e63946;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.form-error {
    background-color: rgba(230, 57, 70, 0.1);
    color: #e63946;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

input.error {
    border-color: #e63946;
    background-color: rgba(230, 57, 70, 0.05);
}

.error-message {
    color: #e63946;
    font-size: 0.85rem;
    display: block;
    margin-top: 0.3rem;
    min-height: 1.2em;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease-out;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert svg {
    flex-shrink: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.welcome-modal-overlay.active {
    display: flex;
}

.welcome-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    max-width: 480px;
    width: 90%;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.welcome-modal-header {
    background: #ffffff;
    color: #1f2937;
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
}

.welcome-icon {
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.welcome-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.welcome-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

.welcome-modal-body {
    padding: 2rem;
}

.userid-section {
    margin-bottom: 1.5rem;
}

.userid-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
}

.userid-label svg {
    color: #6b7280;
    flex-shrink: 0;
    vertical-align: middle;
}

.userid-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.userid-display code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: 1px;
    flex: 1;
    background: none;
    border: none;
    padding: 0;
}

.copy-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.warning-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.warning-icon {
    color: #d97706;
    flex-shrink: 0;
    margin-top: 2px;
}

.warning-content p {
    color: #92400e;
    margin: 0;
    line-height: 1.5;
    font-size: 0.9rem;
    font-weight: 500;
}

.welcome-modal-actions {
    background: #f9fafb;
    padding: 1.5rem 2rem;
    border-top: 1px solid #f3f4f6;
    text-align: center;
}

.primary-btn {
    background: #5271ff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 300px;
}

.primary-btn:hover {
    background: #4361ee;
    transform: translateY(-1px);
}

.primary-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .welcome-modal-content {
        width: 95%;
        margin: 1rem;
        max-width: none;
    }
    
    .welcome-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .welcome-modal-body {
        padding: 1.5rem;
    }
    
    .welcome-modal-actions {
        padding: 1.25rem 1.5rem;
    }
    
    .userid-display {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .userid-display code {
        text-align: center;
        padding: 8px 0;
    }
    
    .copy-btn {
        align-self: center;
        padding: 8px 16px;
    }
}