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

body {
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
}

/* Login container */
.login-container {
    width: auto;
    margin: 0 auto;
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
    object-fit: contain;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.8rem;
    color: #4a6fa5;
}

.logo h1 {
    font-size: 2.4rem;
    color: #2c3e50;
    font-weight: 700;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: 500;
}

/* Login card */
.login-card {
    background-color: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.login-card h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 8px;
    text-align: center;
}

.card-subtitle {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Form styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    color: #95a5a6;
    font-size: 1.1rem;
}

.input-with-icon input {
    width: 100%;
    padding: 15px 15px 15px 48px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fcfdfe;
}

.input-with-icon input:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

.password-toggle {
    position: absolute;
    right: 40px;
    bottom: 28px;
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
}

.password-toggle:hover {
    color: #4a6fa5;
}

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

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    color: #2c3e50;
    font-size: 0.95rem;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #f0f3f7;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #e4e9f2;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #4a6fa5;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-link {
    color: #4a6fa5;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

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

/* Buttons */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: #4a6fa5;
    color: white;
    position: relative;
    height: 52px;
}

.btn-primary:hover {
    background-color: #3d5c8a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 111, 165, 0.2);
}

.btn-google {
    background-color: white;
    color: #444;
    border: 1px solid #ddd;
}

.btn-google:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
}

.btn-text {
    transition: opacity 0.3s;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    right: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #95a5a6;
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider span {
    padding: 0 15px;
}

/* Message box */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: center;
}

.message.error {
    background-color: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.message.success {
    background-color: #eff8ef;
    color: #2a7a2a;
    border-left: 4px solid #2a7a2a;
}

/* Signup link */
.signup-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #7f8c8d;
    font-size: 0.95rem;
}

.signup-link a {
    color: #4a6fa5;
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.footer p {
    margin-bottom: 8px;
}

.footer-links a {
    color: #7f8c8d;
    text-decoration: none;
    margin: 0 5px;
}

.footer-links a:hover {
    color: #4a6fa5;
    text-decoration: underline;
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .login-card {
        padding: 30px 25px;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .forgot-link {
        align-self: flex-end;
    }
}