
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --lightest-gray: #f9fafb;
    --light-gray: #f3f4f6;
    --medium-gray: #e5e7eb;
    --border-color: #d1d5db;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    background-color: var(--lightest-gray);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 420px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

.login-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 25px 30px;
    text-align: center;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    opacity: 0.9;
}

.login-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control.error {
    border-color: var(--danger-color);
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 38px;
    cursor: pointer;
    color: var(--light-text);
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-container input {
    margin-right: 8px;
}

.checkbox-container label {
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
}

.btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.login-footer {
    text-align: center;
    padding: 0 30px 20px;
}

.forgot-password {
    display: block;
    margin-bottom: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.signup-link {
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 14px;
}

.signup-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.signup-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.powered-by {
    font-size: 12px;
    color: var(--light-text);
    opacity: 0.8;
}

.error-message {
    color: var(--danger-color);
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.error-message.visible {
    display: block;
    animation: shake 0.5s ease;
}

.password-strength {
    margin-top: 5px;
    height: 5px;
    border-radius: 5px;
    background-color: var(--medium-gray);
    position: relative;
    overflow: hidden;
    display: none;
}

.password-strength-meter {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
    font-size: 12px;
    margin-top: 5px;
    text-align: right;
    color: var(--light-text);
    display: none;
}



/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .container {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    .login-header, .login-form, .login-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Alert for failed attempts */
.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert.show {
    display: block;
    animation: fadeIn 0.3s ease;
}
