        /* 全局样式重置 */
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        body {
            background-color: #3b9df8;
            color: #333;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        /* 头部样式 */
        .header {
            width: 100%;
            background-color: #3b9df8; /* 蓝色背景 */
            padding: 20px 0;
            text-align: center;
            color: white;
            box-shadow: none;
            /* 移除固定定位，使其随页面滚动 */
            position: relative;
        }

        .header h1 {
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 5px;
        }

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

        /* 主体容器 */
        .container {
            width: 100%;
            max-width: 600px; /* PC端居中且限制宽度 */
            padding: 20px;
            margin: 0 auto;
        }

        /* 卡片样式 */
        .card {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            padding: 20px;
            margin-bottom: 20px;
            position: relative;
            top: -15px;
        }

        /* 分节标题 */
        .section-title {
            display: flex;
            align-items: center;
            color: #3b9df8;
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px dashed #bbb;
        }

        .section-title i {
            margin-right: 8px;
            font-size: 20px;
        }

        /* 表单组 */
        .form-group {
            margin-bottom: 20px;
            position: relative;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            font-size: 14px;
            color: #666;
            font-weight: 500;
        }

        .form-label .required {
            color: #ff4d4f;
            margin-right: 4px;
        }

        .form-control {
            width: 100%;
            padding: 10px 12px;
            font-size: 14px;
            border: 1px solid #d9d9d9;
            border-radius: 4px;
            transition: all 0.3s;
            outline: none;
        }

        .form-control:focus {
            border-color: #3b9df8;
            box-shadow: 0 0 0 2px rgba(59, 157, 248, 0.2);
        }

        .form-control.is-invalid {
            border-color: #ff4d4f;
        }

        .form-control.is-invalid:focus {
            border-color: #ff4d4f;
            box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
        }

        .invalid-feedback {
            margin-top: 6px;
            font-size: 12px;
            color: #ff4d4f;
            line-height: 1.4;
        }

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

        textarea.form-control {
            resize: none; /* 禁止拖动大小 */
            min-height: 120px;
        }

        /* 调整输入框右侧内边距，避免文字覆盖字数统计 */
        input.form-control {
            /* 还原默认padding */
            padding-right: 12px;
        }

        /* 字数统计 */
        .char-count {
            position: absolute;
            bottom: 5px;
            right: 5px;
            font-size: 12px;
            color: #999;
            pointer-events: none;
        }

        .char-count-inline {
            font-size: 12px;
            color: #999;
            margin-left: 20px; /* 距离标题20像素 */
            font-weight: normal;
        }

        .input-wrapper {
            position: relative;
        }

        /* 针对textarea的特殊定位调整 */
        .textarea-wrapper {
            position: relative;
        }
        /* 提示弹窗样式 */
        .alert-content-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .alert-card {
            background-color: white;
            width: 90%;
            max-width: 400px;
            border-radius: 5px;
            padding: 30px 20px;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            font-size: 16px;
            color: #333;
            line-height: 1.6;
            margin-bottom: 20px; /* 与关闭按钮的间距 */
        }

        .alert-close-btn {
            width: 100px;
            height: 36px;
            border-radius:5px;
            background-color: #3b9df8;
            border: none;
            color: white;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(59, 157, 248, 0.3);
            transition: all 0.2s;
        }

        .alert-close-btn:active {
            transform: scale(0.95);
            background-color: #1890ff;
        }

        /* 上传按钮 */
        .upload-btn {
            display: inline-block;
            background-color: #3b9df8;
            color: white;
            padding: 8px 20px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            border: none;
            transition: background-color 0.3s;
        }

        .upload-btn:hover {
            background-color: #1890ff;
        }

        .upload-hint {
            display: block;
            margin-top: 5px;
            margin-left: 0;
            font-size: 12px;
            color: #999;
            text-align: center; /* 文字居中 */
            position: relative;
            left: -50px; /* 向左移动50像素 */
        }
        
        .upload-group .form-control-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center; /* 按钮和文字水平居中 */
        }

        .upload-btn {
            position: relative;
            left: -50px; /* 向左移动50像素 */
        }

        /* 带图标的输入框容器 */
        .input-with-icon {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-with-icon input {
            padding-right: 40px; /* 为图标留出空间 */
        }

        .search-icon-btn {
            position: absolute;
            right: 5px;
            top: 50%;
            transform: translateY(-50%);
            width: 32px;
            height: 32px;
            background-color: #3b9df8;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            cursor: pointer;
            border: none;
        }

        /* 已选文件列表 */
        .selected-file-list {
            margin-top: 10px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            width: 100%;
            /* align-items: center; */ /* 取消居中，由内部容器控制对齐 */
            position: relative;
            left: -50px; /* 保持与上面按钮一样的偏移量，实现左对齐 */
        }

        .selected-file-item {
            display: flex;
            align-items: center;
            background-color: #f0f9ff;
            border: 1px solid #bae7ff;
            border-radius: 4px;
            padding: 5px 10px;
            font-size: 13px;
            color: #3b9df8;
            max-width: 100%; /* 宽度自适应 */
            width: fit-content; /* 内容决定宽度 */
            margin: 0 auto; /* 水平居中 */
        }

        .selected-file-name {
            margin-right: 8px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 200px;
        }

        .selected-file-remove {
            width: 16px;
            height: 16px;
            background-color: #ff4d4f;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px; /* X号字体 */
            cursor: pointer;
            flex-shrink: 0;
            line-height: 1;
        }

        /* 搜索框内的上传按钮 */
        .input-with-upload {
            position: relative;
            width: 100%;
            display: flex;
            align-items: center;
        }
        
        .search-input {
            padding-right: 40px !important; /* Space for the button */
        }

        .search-upload-btn {
            position: absolute;
            right: 5px;
            top: 50%;
            transform: translateY(-50%);
            width: 30px;
            height: 30px;
            border: none;
            background: transparent;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #3b9df8;
            border-radius: 4px;
            z-index: 10;
        }

        .search-upload-btn:hover {
            background-color: #e6f7ff;
        }

        /* 上传提示气泡 - 始终显示 */
        .upload-tooltip {
            position: absolute;
            right: -10px;
            top: -85px; /* 稍微降低高度，避免超出屏幕 */
            background-color: #ff4d4f;
            color: white;
            padding: 6px 12px;
            border-radius: 4px;
            font-size: 12px;
            white-space: nowrap;
            z-index: 20;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            animation: tooltipBounce 1.5s infinite;
            pointer-events: none; /* 防止遮挡点击 */
            line-height: 1.5; /* 确保文字垂直居中 */
        }

        /* 箭杆 */
        .upload-tooltip::before {
            content: '';
            position: absolute;
            top: 100%;
            right: 29px;
            width: 2px;
            height: 40px; /* 缩短箭杆 */
            background-color: #ff4d4f;
        }

        /* 箭头 */
        .upload-tooltip::after {
            content: '';
            position: absolute;
            top: calc(100% + 40px); /* 对应箭杆长度 */
            right: 24px;
            border-width: 6px 6px 0;
            border-style: solid;
            border-color: #ff4d4f transparent transparent transparent;
        }

        @keyframes tooltipBounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-5px); }
        }

        /* 提交按钮 */
        .submit-btn-container {
            text-align: center;
            margin-top: 30px;
            padding-bottom: 20px;
        }

        .submit-btn {
            background-color: #1890ff; /* 更深的蓝色 */
            color: white;
            padding: 12px 40px;
            border: none;
            border-radius: 4px;
            font-size: 16px;
            cursor: pointer;
            width: 200px;
            transition: background-color 0.3s;
        }

        .submit-btn:hover {
            background-color: #096dd9;
        }

        /* 响应式调整 */
        @media (min-width: 600px) {
            .form-group {
                display: flex;
                align-items: flex-start; /* 顶部对齐 */
            }

            .form-label {
                width: 100px; /* 固定标签宽度 */
                padding-top: 10px; /* 与输入框文字对齐 */
                margin-bottom: 0;
                flex-shrink: 0;
            }
            
            /* 特殊处理附件上传的对齐 */
            .upload-group .form-label {
                padding-top: 8px;
            }

            .upload-group .form-control-wrapper {
                padding-left: 5px;
            }

            .form-control-wrapper {
                flex-grow: 1;
                width: calc(100% - 100px);
            }
        }
        
        /* 移动端调整 */
        @media (max-width: 599px) {
            .form-group {
                display: block;
            }
            
            .form-label {
                margin-bottom: 5px;
            }
            
            .form-control-wrapper {
                width: 100%;
            }

            /* 移动端特殊处理上传附件组，保持左右排列 */
            .form-group.upload-group {
                display: flex;
                align-items: flex-start;
            }

            .form-group.upload-group .form-label {
                width: auto;
                margin-right: 15px;
                margin-bottom: 0;
                padding-top: 8px; /* 保持与按钮对齐 */
                white-space: nowrap; /* 强制不换行 */
            }

            .form-group.upload-group .form-control-wrapper {
                padding-left: 5px;
            }
            
            .container {
                padding: 10px;
            }
            
            .header {
                padding: 15px 0;
            }
            
            .header h1 {
                font-size: 20px;
            }
        }

        /* SVG 图标样式 */
        .icon {
            width: 1em;
            height: 1em;
            vertical-align: -0.125em;
            fill: currentColor;
            overflow: hidden;
        }

        /* 悬浮搜索按钮 */
        .floating-search-btn {
            position: fixed;
            right: 20px;
            bottom: 100px;
            width: 50px;
            height: 50px;
            background-color: #3b9df8;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            box-shadow: 0 4px 12px rgba(59, 157, 248, 0.4);
            cursor: pointer;
            z-index: 1000;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }

        .floating-search-btn:hover {
            transform: scale(1.1);
        }

        /* 隐藏状态（吸附在侧边） */
        .floating-search-btn.docked {
            right: -25px; /* 只露出一半 */
            opacity: 0.6;
        }

        .floating-search-btn.docked:hover {
            right: 20px; /* 鼠标悬停时恢复 */
            opacity: 1;
            transform: scale(1.1);
        }

        /* 弹窗样式 */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s;
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .modal-content {
            background-color: white;
            width: 90%;
            max-width: 400px;
            border-radius: 12px;
            padding: 24px;
            transform: translateY(20px);
            transition: all 0.3s;
            position: relative;
        }

        .modal-overlay.active .modal-content {
            transform: translateY(0);
        }

        .modal-close {
            position: absolute;
            top: 16px;
            right: 16px;
            font-size: 20px;
            color: #999;
            cursor: pointer;
            line-height: 1;
        }

        .modal-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 20px;
            text-align: center;
            color: #333;
        }

        .search-box {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-bottom: 0;
        }

        .search-actions {
            display: flex;
            justify-content: center;
            gap: 15px;
        }
        
        /* 热门查询 */
        .hot-queries {
            display: grid;
            grid-template-columns: repeat(3, 1fr); /* 强制一排三个，均分宽度 */
            gap: 8px;
            margin-top: 1px; /* 向上移动5px (原为6px) */
            position: relative; 
            top: -5px; /* 进一步向上微调 */
            width: 100%;
        }
        
        .hot-query-chip {
            display: inline-block;
            padding: 6px 4px; /* 减小左右内边距以适应更窄的空间 */
            border: 1px solid #3b9df8;
            border-radius: 9999px;
            color: #3b9df8;
            background-color: #ffffff;
            font-size: 12px; /* 稍微缩小字体 */
            line-height: 1;
            cursor: pointer;
            user-select: none;
            position: relative; /* 为删除按钮定位 */
            text-align: center; /* 文本居中 */
            box-sizing: border-box;
            /* 移除 overflow: hidden; 改用内部元素截断来防止遮挡绝对定位的删除按钮 */
        }
        
        /* 新增：用于包裹文字并实现截断的内部元素 */
        .hot-query-text {
            display: block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }
        
        .hot-query-chip:hover {
            background-color: #e6f7ff;
        }

        /* 热门查询删除按钮 */
        .hot-query-delete {
            position: absolute;
            top: -6px;
            right: -6px;
            width: 14px;
            height: 14px;
            background-color: #ff4d4f;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            line-height: 1;
            box-shadow: 0 1px 3px rgba(0,0,0,0.2);
            opacity: 0; /* 默认隐藏 */
            transition: opacity 0.2s;
            z-index: 5;
        }

        /* 鼠标悬停在chip上时显示删除按钮 */
        .hot-query-chip:hover .hot-query-delete {
            opacity: 1;
        }
        
        /* 移动端由于没有hover，可以考虑始终显示或通过其他方式交互，这里暂且设为hover显示。
           如果需要移动端也易用，可以设为始终显示，或者调整大小。
           考虑到用户说“点击可以删除”，如果一直显示可能会比较乱。
           但移动端没有hover状态，点击chip会直接查询。
           为了兼容移动端，可以设为始终显示但透明度低一点？或者就让它一直显示。
           用户要求“增加一个红色的X”，没说必须hover才显示。
           为了更直观，我设为始终显示。 */
        .hot-query-delete {
            opacity: 1; /* 改为始终显示，方便移动端操作 */
        }

        .search-input {
            width: 100%;
            padding: 10px;
            border: 1px solid #d9d9d9;
            border-radius: 4px;
            outline: none;
        }

        .search-input:focus {
            border-color: #3b9df8;
        }

        .search-btn {
            background-color: #3b9df8;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 10px 0;
            cursor: pointer;
            flex: 1;
            font-size: 14px;
        }

        .search-btn-close {
            background-color: #f5f5f5;
            color: #666;
            border: 1px solid #d9d9d9;
            border-radius: 4px;
            padding: 10px 0;
            cursor: pointer;
            flex: 1;
            font-size: 14px;
        }
        
        .result-area {
            font-size: 14px;
        }

        .result-area:not(:empty) {
            border-top: 1px dashed #e0e0e0;
            padding-top: 15px;
            margin-top: 20px;
        }
        
        .result-item {
            margin-bottom: 10px;
        }
        
        .result-label {
            color: #666;
            margin-right: 5px;
        }
        
        .status-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 12px;
            background-color: #e6f7ff;
            color: #1890ff;
            border: 1px solid #91d5ff;
        }
        
        .reply-btn {
            color: #3b9df8;
            cursor: pointer;
            text-decoration: underline;
            margin-left: 10px;
        }

        .reply-content {
            background-color: #f9f9f9;
            padding: 10px;
            border-radius: 4px;
            margin-top: 10px;
            display: none;
        }

        .reply-content .result-value-strong {
            text-align: justify;
            text-justify: inter-ideograph; /* 兼容旧版浏览器和加强中文对齐 */
            text-indent: 2em;
            white-space: pre-wrap;
            word-break: break-all; /* 强制断行，避免英文单词导致无法对齐 */
        }

        .result-value-strong {
            font-weight: 700;
        }

        .search-result-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 14px;
            width: 100%;
        }

        .search-result-actions {
            display: flex;
            justify-content: center;
            width: 90%;
            max-width: 400px;
        }

        .search-result-close-btn {
            width: 100px;
            flex: 0 0 auto;
        }

        /* 修复查询结果弹窗过高导致遮挡的问题 */
        #searchResultModal .modal-content {
            max-height: 60vh;
            display: flex;
            flex-direction: column;
        }

        #searchResultModal .modal-title {
            flex-shrink: 0;
        }

        #searchResultModal .result-area {
            overflow-y: auto;
            padding-right: 5px;
            flex: 1;
            min-height: 0; /* 必须，否则 flex item 不会收缩 */
        }
        
        /* Flex布局下margin不折叠，调整间距 */
        #searchResultModal .result-area:not(:empty) {
            margin-top: 0;
        }

        /* 提交成功回执卡片 */
        .receipt-card {
            background: white;
            padding: 30px 20px;
            text-align: center;
            border-radius: 12px;
            width: 100%;
        }

        .receipt-title {
            font-size: 20px;
            font-weight: bold;
            color: #3b9df8;
            margin-bottom: 20px;
        }

        .receipt-id-box {
            background-color: #f0f9ff;
            border: 1px dashed #3b9df8;
            padding: 15px;
            margin: 20px 0;
            border-radius: 8px;
        }

        .receipt-id-label {
            font-size: 14px;
            color: #666;
            margin-bottom: 5px;
        }

        .receipt-id-value {
            font-size: 24px;
            font-weight: bold;
            color: #333;
            letter-spacing: 1px;
        }

        .receipt-id-row {
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .copy-btn {
            background: white;
            border: 1px solid #3b9df8;
            color: #3b9df8;
            border-radius: 4px;
            padding: 4px 10px;
            font-size: 13px;
            cursor: pointer;
            margin-left: 10px;
            transition: all 0.3s;
            line-height: 1.5;
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
        }

        .copy-btn:hover {
            background-color: #3b9df8;
            color: white;
        }

        .receipt-tip {
            font-size: 14px;
            color: #666;
            line-height: 1.6;
            margin-bottom: 25px;
        }

        .receipt-actions {
            display: flex;
            justify-content: space-between;
            gap: 15px;
        }

        .receipt-btn {
            flex: 1;
            padding: 10px 0;
            border-radius: 20px;
            font-size: 14px;
            cursor: pointer;
            border: none;
            transition: opacity 0.3s;
        }

        .receipt-btn-close {
            background-color: #f5f5f5;
            color: #666;
        }

        .receipt-btn-save {
            background-color: #3b9df8;
            color: white;
        }

        .receipt-btn:hover {
            opacity: 0.8;
        }

        /* 新增：未找到记录弹窗样式 (仿照admin.html退出弹窗) */
        .modal-header-custom {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 1px solid #e8e8e8;
        }

        .modal-title-custom {
            font-size: 16px;
            font-weight: bold;
            color: #333;
            margin: 0;
        }

        .modal-close-custom {
            font-size: 20px;
            color: #999;
            cursor: pointer;
            line-height: 1;
        }
        
        .modal-footer-custom {
            display: flex;
            justify-content: center;
            gap: 12px;
            padding-top: 15px;
            border-top: 1px solid #e8e8e8;
            margin-top: 20px;
        }

        .btn-common {
            padding: 8px 25px;
            border-radius: 4px;
            border: none;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s;
        }

        .btn-submit-custom {
            background-color: #3b9df8;
            color: white;
        }
        
        .btn-submit-custom:hover {
            background-color: #1890ff;
        }

        /* 加载中遮罩层 */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(255, 255, 255, 0.7);
            z-index: 3000;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            visibility: hidden;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .loading-overlay.active {
            visibility: visible;
            opacity: 1;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 5px solid #f3f3f3;
            border-top: 5px solid #3b9df8;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 15px;
        }

        .loading-text {
            color: #3b9df8;
            font-size: 16px;
            font-weight: 500;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* 移动端适配：防止输入框聚焦时页面自动缩放 */
        @media screen and (max-width: 768px) {
            .form-control, 
            .search-input,
            select.form-control,
            textarea.form-control {
                font-size: 16px !important;
            }
        }

        /* 仿 Admin 弹窗样式 - 二维码加载专用 */
        #qrLoadingModal {
            z-index: 2100; /* 确保在查询弹窗(2000)之上 */
        }

        .admin-modal-content {
            width: 320px !important;
            padding: 0 !important;
            border-radius: 8px !important;
            overflow: hidden;
            background-color: white;
            /* 覆盖 index.html 可能存在的样式冲突 */
            max-width: none !important; 
        }

        .admin-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            border-bottom: 1px solid #e8e8e8;
            background-color: #fff;
        }

        .admin-modal-title {
            font-size: 16px;
            font-weight: bold;
            color: #333;
            margin: 0 !important;
        }

        .admin-modal-close {
            font-size: 20px;
            color: #999;
            cursor: pointer;
            line-height: 1;
            position: static !important; 
        }

        .admin-modal-body {
            padding: 30px 20px;
            text-align: center;
            font-size: 16px;
            color: #333;
        }
