:root {
    --bg-body: #f4f7f6;
    --primary-color: #6C2B85;
    --secondary-color: #4B1D5E;
    --accent-color: #FFB800;
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-light: #eaeaeb;
    --error-color: #d32f2f;
    --success-color: #4caf50;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}
    
body { 
    font-family: 'Segoe UI', system-ui, sans-serif; 
    background-color: var(--bg-body); 
    color: var(--text-dark); 
    line-height: 1.6; 
}

.login-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

.login-container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 30px;
    text-align: center;
    color: white;
    position: relative;
}

.login-header h1 {
    font-size: 2em;
    font-weight: 900;
    font-style: italic;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.login-header p {
    font-size: 0.95em;
    opacity: 0.9;
}

.back-button-corner {
    position: absolute;
    top: 15px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 700;
    background: white;
    padding: 8px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.back-button-corner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background: #f8f9fa;
}

.login-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.85em;
    font-weight: 900;
    font-style: italic;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.95em;
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(108, 43, 133, 0.1);
}

.password-container {
    position: relative;
}

.password-container input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    color: #999;
    transition: color 0.2s;
    padding: 0;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.forgot-password-container {
    text-align: right;
    margin-bottom: 15px;
}

.forgot-password-container a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: opacity 0.2s;
}

.forgot-password-container a:hover {
    opacity: 0.7;
}

.login-button {
    width: 100%;
    background: linear-gradient(90deg, #9d3b94 0%, #6C2B85 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 900;
    font-style: italic;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(157, 59, 148, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(157, 59, 148, 0.4);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    background: linear-gradient(135deg, var(--error-color), #b71c1c);
    padding: 20px;
    border-radius: 16px 16px 0 0;
    color: white;
}

.modal-header h3 {
    font-size: 1.5em;
    margin: 0;
}

.modal-body {
    padding: 30px;
}

.modal-body p {
    color: var(--text-dark);
    margin-bottom: 20px;
}

.modal-button {
    background: linear-gradient(90deg, #9d3b94 0%, #6C2B85 100%);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    font-size: 0.95em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.modal-button:hover {
    transform: translateY(-2px);
}

.errorlist {
    list-style: none;
    background-color: #ffe8e8;
    border-left: 4px solid var(--error-color);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.errorlist li {
    color: var(--error-color);
    font-size: 0.85em;
}

.field-errorlist {
    margin-top: 8px;
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 20px 10px;
    }

    .login-container {
        width: 92%;
        border-radius: 16px;
    }

    .login-header {
        padding: 60px 15px 20px 15px;
    }
    
    .back-button-corner {
        top: 15px;
        left: 15px;
        transform: none;
        font-size: 0.75em;
        padding: 6px 14px;
    }
    
    .back-button-corner:hover {
        transform: translateY(-2px);
    }
    
    .login-form {
        padding: 20px;
    }
    
    .login-header h1 {
        font-size: 1.6em;
    }
    
    .login-header p {
        font-size: 0.85em;
    }
    
    .login-button {
        font-size: 1em;
        padding: 12px;
    }
}