/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-red: #d32f2f;
    --dark-red: #b71c1c;
    --light-red: #ffcdd2;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
    --medium-gray: #9e9e9e;
}

body {
    background-color: var(--light-gray);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.login-container {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Logo section */
.logo-section {
    background-color: var(--primary-red);
    color: var(--white);
    padding: 30px 20px;
    text-align: center;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.client-name {
    font-size: 1rem;
    opacity: 0.9;
}

/* Form section */
.form-section {
    padding: 30px;
}

.form-section h2 {
    color: var(--dark-gray);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-gray);
    font-weight: 500;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--medium-gray);
}

.input-with-icon .toggle-password {
    left: auto;
    right: 12px;
    cursor: pointer;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 8px;
    accent-color: var(--primary-red);
}

.forgot-password {
    color: var(--primary-red);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: var(--dark-red);
}

/* Responsive design */
@media (min-width: 768px) {
    .login-container {
        flex-direction: row;
        height: 500px;
    }
    
    .logo-section {
        width: 40%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .form-section {
        width: 60%;
        padding: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* Messages container */
.messages {
    margin-bottom: 20px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alert styles */
.alert {
    padding: 15px;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s ease;
}

/* Error alert */
.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid var(--primary-red);
}

.alert-error::before {
    content: "⚠";
    font-size: 1.2rem;
}

/* Success alert */
.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-success::before {
    content: "✓";
    font-size: 1.2rem;
}

/* Warning alert */
.alert-warning {
    background-color: #fff3e0;
    color: #e65100;
    border-left: 4px solid #ff9800;
}

.alert-warning::before {
    content: "!";
    font-size: 1.2rem;
}

/* Info alert */
.alert-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

.alert-info::before {
    content: "ℹ";
    font-size: 1.2rem;
}

/* Close animation */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.alert {
    animation: slideDown 0.3s ease-out;
}