/**
 * Login Page Styles
 * Responsive login form with modern design
 */

.login-container {
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 3rem 1rem;
}

/* Login Section */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
    max-width: 450px;
    border: 1px solid #e0e0e0;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f5f5f5;
}

.login-header h1 {
    font-size: 1.75rem;
    color: #333;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.login-header p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* Alert Messages */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease-out;
}

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

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

.alert-error i {
    flex-shrink: 0;
}

.alert-success {
    background-color: #efe;
    color: #0a0;
    border-left: 4px solid #0a0;
}

.alert-success i {
    flex-shrink: 0;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 6px 0 0 6px;
    background-color: #f9f9f9;
    color: #999;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
    flex-shrink: 0;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 0 6px 6px 0;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: white;
    text-indent: 0;
    flex: 1;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #999;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #333;
}

/* Remember Me */
.remember-me {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-label {
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    margin: 0;
}

/* Form Errors */
.form-error {
    display: none;
    font-size: 0.85rem;
    color: #c00;
    margin-top: 0.25rem;
}

.form-error.show {
    display: block;
}

.form-control.error {
    border-color: #c00;
}

/* Buttons */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    width: 1rem;
    height: 1rem;
}

/* Login Links */
.login-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s ease;
}

.link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Login Footer */
.login-footer {
    text-align: center;
    padding-top: 1rem;
}

.login-footer p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.register-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.25rem;
}

/* Support Section */
.login-support {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.support-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    max-width: 450px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.support-card h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
}

.support-card p {
    margin: 0 0 1.5rem 0;
    opacity: 0.95;
    font-size: 0.95rem;
}

.support-card .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Demo User Button */
.demo-user-container {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.btn-demo {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-demo:hover {
    background-color: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-demo:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(23, 162, 184, 0.3);
}

.btn-demo i {
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 2rem 1rem;
        gap: 1.5rem;
    }

    .login-card {
        padding: 1.5rem;
        max-width: 100%;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-header {
        margin-bottom: 1.5rem;
    }

    .login-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .link {
        justify-content: center;
    }

    .support-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1.5rem 1rem;
    }

    .login-card {
        padding: 1.25rem;
        border-radius: 8px;
    }

    .login-header h1 {
        font-size: 1.25rem;
    }

    .login-header p {
        font-size: 0.85rem;
    }

    .form-control {
        padding: 0.65rem 1rem 0.65rem 2.3rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn-login {
        padding: 0.8rem;
    }
}
