{
    "id": "login_page",
    "widgettype": "VBox",
    "options": {
        "width": "100%",
        "height": "100vh",
        "alignItems": "center",
        "justifyContent": "center",
        "bgcolor": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
    },
    "subwidgets": [
        {
            "widgettype": "VBox",
            "options": {
                "width": "400px",
                "borderRadius": "12px",
                "boxShadow": "0 8px 32px rgba(0,0,0,0.15)",
                "padding": "40px 32px",
                "bgcolor": "white"
            },
            "subwidgets": [
                {
                    "widgettype": "Text",
                    "options": {
                        "text": "CRM系统登录",
                        "fontSize": "24px",
                        "fontWeight": "bold",
                        "textAlign": "center",
                        "marginBottom": "24px",
                        "color": "#333"
                    }
                },
                {
                    "widgettype": "Form",
                    "id": "login_form",
                    "options": {
                        "url": "{{entire_url('api/login.dspy')}}",
                        "method": "POST",
                        "fields": [
                            {
                                "name": "username",
                                "label": "用户名",
                                "uitype": "str",
                                "required": true,
                                "placeholder": "请输入用户名"
                            },
                            {
                                "name": "password",
                                "label": "密码",
                                "uitype": "password",
                                "required": true,
                                "placeholder": "请输入密码"
                            }
                        ],
                        "submitLabel": "登录",
                        "submitVariant": "primary",
                        "submitFullWidth": true
                    }
                },
                {
                    "widgettype": "HBox",
                    "options": {
                        "justifyContent": "center",
                        "marginTop": "16px",
                        "gap": "16px"
                    },
                    "subwidgets": [
                        {
                            "widgettype": "Button",
                            "id": "btn_register",
                            "options": {
                                "label": "注册账号",
                                "variant": "text",
                                "url": "{{entire_url('/rbac/user/register.ui')}}"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}