
        /* T12a：系统中文字体栈（原 Google Fonts Inter/Noto Sans SC 删除） */
        :root { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
        body, .page-title, .page-subtitle, button, input, select, textarea {
            font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
        }

        /* ============================================================
           设计令牌 - 基于 china-reach.net 风格规范
           主色: #2f7d4f WorkBuddy 图标绿 | 次级: #3d5a6c 深蓝
        ============================================================ */
        :root {
            /* 品牌色系 */
            --color-primary: #2f7d4f;
            --color-primary-hover: #215c3a;
            --color-primary-active: #215c3a;
            --color-primary-light: #3f9b64;
            --color-accent-green: #2f7d4f;
            --color-secondary: #3d5a6c;

            /* 中性色 */
            --color-text: #1d2822;
            --color-text-regular: #333333;
            --color-text-secondary: #666666;
            --color-text-placeholder: #999999;
            --color-border: #e2eae4;
            --color-bg-page: #f7faf8;
            --color-bg-card: #ffffff;
            --color-bg-soft: #eaf4ee;

            /* 语义色 */
            --color-success: #2f7d4f;
            --color-warning: #e6a23c;
            --color-danger: #f56c6c;
            --color-info: #3d5a6c;

            /* 阴影与圆角 */
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
            --radius-sm: 4px;
            --radius-md: 6px;
            --radius-lg: 8px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--color-bg-page);
            color: var(--color-text-regular);
            font-size: 14px;
            line-height: 1.6;
            min-height: 100vh;
        }

        /* ====== 顶部导航栏 ====== */
        .navbar-main {
            background: var(--color-bg-card) !important;
            border-bottom: 3px solid var(--color-accent-green);
            padding: 0.8rem 1.5rem;
            box-shadow: var(--shadow-sm);
        }

        .brand-logo {
            font-weight: 700;
            font-size: 1.35rem;
            color: var(--color-primary) !important;
            display: flex;
            align-items: center;
            gap: 0.6rem;
            text-decoration: none !important;
            letter-spacing: -0.3px;
        }

        .brand-logo i {
            font-size: 1.6rem;
            color: var(--color-primary);
        }

        .nav-link-main {
            color: var(--color-text-regular) !important;
            font-weight: 500;
            font-size: 0.95rem;
            padding: 0.6rem 1rem !important;
            border-radius: var(--radius-sm);
            transition: all 0.2s ease;
            position: relative;
        }

        .nav-link-main:hover {
            color: var(--color-primary) !important;
            background-color: var(--color-bg-soft);
        }

        .nav-link-main.active {
            color: var(--color-primary) !important;
            font-weight: 600;
            background-color: var(--color-bg-soft);
        }

        .btn-login-main {
            background-color: var(--color-primary) !important;
            border-color: var(--color-primary) !important;
            color: white !important;
            font-weight: 600;
            border-radius: var(--radius-md);
            padding: 0.5rem 1.3rem !important;
            transition: all 0.2s ease;
        }

        .btn-login-main:hover {
            background-color: var(--color-primary-hover) !important;
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }

        /* ====== 主容器 ====== */
        .main-container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 2rem 1.5rem;
        }

        /* ====== 页面标题区（T02 压缩：搜索卡进首屏第一视觉位） ====== */
        .page-header {
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
            border-radius: var(--radius-lg);
            padding: 1.1rem 2rem;
            margin-bottom: 1.1rem;
            color: white;
            box-shadow: var(--shadow-md);
        }

        .page-title {
            font-size: 1.45rem;
            font-weight: 700;
            margin-bottom: 0.15rem;
            letter-spacing: -0.5px;
        }

        .page-subtitle {
            font-size: 1rem;
            opacity: 0.92;
            margin-bottom: 0.6rem;
            font-weight: 400;
        }

        .header-stats {
            display: flex;
            gap: 2rem;
            flex-wrap: wrap;
            /* 统计条与主搜索区保持约 1cm 空隙 */
            margin-top: 38px;
         visibility: hidden; }   /* 收录量行留空（未启用时占位，避免布局跳动） */

        .header-stat-item {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            background: rgba(255,255,255,0.15);
            padding: 0.6rem 1.2rem;
            border-radius: var(--radius-md);
            backdrop-filter: blur(10px);
        }

        .header-stat-number {
            font-size: 1.5rem;
            font-weight: 700;
            line-height: 1;
        }

        .header-stat-label {
            font-size: 0.85rem;
            opacity: 0.9;
        }

        /* ====== 数据库选择区 ====== */
        .database-selector {
            background: var(--color-bg-card);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            padding: 1.2rem 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: var(--shadow-sm);
        }

        .selector-title {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--color-text);
            margin-bottom: 0.8rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .selector-title i {
            color: var(--color-primary);
        }

        .db-tag-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.8rem;
        }

        .db-tag {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.55rem 1.1rem;
            background: white;
            border: 2px solid var(--color-border);
            border-radius: 50px;
            /* 显式深色文字：搜索卡嵌在绿色横幅内会继承 .site-banner-inner 的白色文字，
               未选中（白底）胶囊若继承白色则文字不可见 */
            color: var(--color-text);
            font-weight: 600;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.25s ease;
            user-select: none;
        }

        .db-tag:hover {
            border-color: var(--color-primary-light);
            background-color: var(--color-bg-soft);
        }

        .db-tag.active {
            border-color: var(--color-primary);
            background-color: var(--color-primary);
            color: white;
            box-shadow: 0 2px 8px rgba(0,153,68,0.3);
        }

        .db-tag i {
            font-size: 1rem;
        }

        /* 库名后的英文缩写
           层级：中文名为主（前景色 + 600 字重），缩写作辅助标识（等宽字体 + 降透明度）
           选中态继承 .db-tag.active 的 white，未选中态用 --color-text 的 65% 透明度，
           保证白底与绿底两种状态下都清晰可辨。 */
        .db-tag-abbr {
            font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.02em;
            opacity: 0.65;
            padding: 0.05rem 0.34rem;
            border: 1px solid currentColor;
            border-radius: 4px;
            line-height: 1.25;
            white-space: nowrap;
        }

        .db-tag.active .db-tag-abbr {
            opacity: 0.9;
        }

        /* ====== 搜索卡片 ====== */
        .search-card {
            background: var(--color-bg-card);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
            overflow: hidden;
        }

        .search-card-header {
            background: var(--color-bg-soft);
            padding: 1.2rem 1.5rem;
            border-bottom: 1px solid var(--color-border);
        }

        .search-card-title {
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--color-text);
            display: flex;
            align-items: center;
            gap: 0.6rem;
            margin: 0;
        }

        .search-card-title i {
            color: var(--color-primary);
        }

        .search-card-body {
            padding: 1.5rem;
        }

        /* ====== 标签页样式 ====== */
        .nav-tabs-custom {
            border-bottom: 2px solid var(--color-border);
            gap: 0;
            margin-bottom: 1.5rem;
        }

        .nav-tab-btn {
            color: var(--color-text-secondary) !important;
            font-weight: 600;
            font-size: 0.92rem;
            padding: 0.75rem 1.3rem !important;
            border: none !important;
            border-bottom: 3px solid transparent !important;
            border-radius: 0 !important;
            transition: all 0.2s ease;
            background: transparent !important;
            position: relative;
        }

        .nav-tab-btn:hover {
            color: var(--color-primary) !important;
            border-bottom-color: var(--color-accent-green) !important;
        }

        .nav-tab-btn.active {
            color: var(--color-primary) !important;
            border-bottom-color: var(--color-primary) !important;
            font-weight: 700;
            background: transparent !important;
        }

        .nav-tab-btn i {
            margin-right: 0.4rem;
            font-size: 1rem;
        }

        /* ====== 表单控件 ====== */
        .form-control-green {
            border: 1.5px solid var(--color-border);
            border-radius: var(--radius-md);
            padding: 0.7rem 1rem;
            font-size: 0.95rem;
            font-weight: 400;
            transition: all 0.2s ease;
            background: white;
            color: var(--color-text);
        }

        .form-control-green:focus {
            border-color: var(--color-primary);
            box-shadow: 0 0 0 3px rgba(0,153,68,0.12);
            outline: none;
        }

        .form-control-green::placeholder {
            color: var(--color-text-placeholder);
        }

        .form-select-green {
            border: 1.5px solid var(--color-border);
            border-radius: var(--radius-md);
            padding: 0.7rem 1rem;
            font-size: 0.92rem;
            font-weight: 500;
            transition: all 0.2s ease;
            background: white;
            cursor: pointer;
            color: var(--color-text);
        }

        .form-select-green:focus {
            border-color: var(--color-primary);
            box-shadow: 0 0 0 3px rgba(0,153,68,0.12);
            outline: none;
        }

        /* ====== 按钮 ====== */
        .btn-primary-green {
            background-color: var(--color-primary) !important;
            border-color: var(--color-primary) !important;
            color: white !important;
            font-weight: 600;
            font-size: 0.95rem;
            padding: 0.72rem 1.8rem;
            border-radius: var(--radius-md);
            transition: all 0.25s ease;
            box-shadow: var(--shadow-sm);
        }

        .btn-primary-green:hover {
            background-color: var(--color-primary-hover) !important;
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
            color: white !important;
        }

        .btn-primary-green:active {
            transform: translateY(0);
        }

        .btn-secondary-green {
            background: white !important;
            border: 1.5px solid var(--color-border) !important;
            color: var(--color-text-secondary) !important;
            font-weight: 600;
            padding: 0.65rem 1.5rem;
            border-radius: var(--radius-md);
            transition: all 0.2s ease;
        }

        .btn-secondary-green:hover {
            border-color: var(--color-primary) !important;
            color: var(--color-primary) !important;
            background-color: var(--color-bg-soft) !important;
        }

        .btn-export-green {
            background-color: var(--color-secondary) !important;
            border-color: var(--color-secondary) !important;
            color: white !important;
            font-weight: 600;
            padding: 0.6rem 1.3rem;
            border-radius: var(--radius-md);
            transition: all 0.2s ease;
        }

        .btn-export-green:hover {
            background-color: #215c3a !important;
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
            color: white !important;
        }

        /* ====== 结果展示区域 ====== */
        .results-section {
            margin-top: 1.5rem;
        }

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

        .results-header-bar {
            background: var(--color-bg-card);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            padding: 1.2rem 1.5rem;
            margin-bottom: 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
            box-shadow: var(--shadow-sm);
        }

        .results-stats-group {
            display: flex;
            gap: 1.8rem;
            flex-wrap: wrap;
        }

        .result-stat-badge {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .result-stat-badge i {
            color: var(--color-primary);
            font-size: 1.1rem;
        }

        .result-stat-value {
            font-size: 1.25rem;
            color: var(--color-primary);
            font-weight: 700;
        }

        .result-stat-label {
            color: var(--color-text-secondary);
            font-size: 0.88rem;
        }

        /* ====== 结果卡片 ====== */
        .result-card {
            background: var(--color-bg-card);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            padding: 1.4rem;
            margin-bottom: 0.85rem;
            cursor: pointer;
            transition: all 0.25s ease;
            position: relative;
            overflow: hidden;
        }

        .result-card::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background: var(--color-primary);
            transform: scaleY(0);
            transition: transform 0.25s ease;
        }

        .result-card:hover {
            border-color: var(--color-primary-light);
            box-shadow: var(--shadow-md);
            transform: translateX(4px);
        }

        .result-card:hover::before {
            transform: scaleY(1);
        }

        .result-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.8rem;
        }

        .result-name {
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--color-text);
            line-height: 1.4;
        }

        .result-alias-text {
            color: var(--color-text-secondary);
            font-size: 0.88rem;
            margin-top: 0.25rem;
        }

        .result-db-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.35rem 0.85rem;
            background: var(--color-bg-soft);
            border: 1px solid rgba(0,153,68,0.25);
            border-radius: 50px;
            font-size: 0.82rem;
            font-weight: 600;
            color: var(--color-primary);
            white-space: nowrap;
        }

        /* PubChem 缓存库来源徽标（蓝色系，与名录库绿色区分） */
        .result-db-badge.pubchem {
            background: #e3ebf0;
            border-color: rgba(61,90,108,0.28);
            color: var(--color-secondary);
        }
        /* 各数据库来源徽标配色 */
        .result-db-badge.db-weixian { background:#fdeceb; border-color:rgba(220,53,69,0.25); color:#c0392b; }
        .result-db-badge.db-iecic   { background:#fdf0f5; border-color:rgba(214,51,132,0.25); color:#b3446c; }
        .result-db-badge.db-gb9685  { background:#e6f7f6; border-color:rgba(13,148,136,0.25); color:#0d7a70; }

        /* ====== 平台工具导航（工具门户卡片） ====== */
        .tool-portal-title {
            font-weight: 700;
            color: var(--color-text);
            margin-bottom: 0.9rem;
            font-size: 1.05rem;
        }
        .tool-portal-title i { color: var(--color-primary); }
        .tool-portal-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
            gap: 0.9rem;
        }
        .tool-portal-card {
            display: flex;
            align-items: center;
            gap: 0.85rem;
            background: var(--color-bg-card);
            border: 1px solid var(--color-border);
            border-radius: 12px;
            padding: 0.95rem 1.1rem;
            text-decoration: none !important;
            transition: all 0.2s ease;
            box-shadow: var(--shadow-sm);
        }
        .tool-portal-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-md);
            border-color: var(--color-accent-green);
        }
        .tool-portal-icon {
            flex: 0 0 44px;
            width: 44px;
            height: 44px;
            border-radius: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
        }
        .tool-portal-text { display: flex; flex-direction: column; min-width: 0; }
        .tool-portal-name {
            font-weight: 700;
            font-size: 0.95rem;
            color: var(--color-text);
            line-height: 1.4;
        }
        .tool-portal-desc {
            font-size: 0.78rem;
            color: var(--color-text-secondary);
            line-height: 1.4;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .result-fields-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 0.8rem;
            margin-top: 0.8rem;
        }

        .result-field-item {
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
        }

        .field-label-text {
            font-size: 0.78rem;
            color: var(--color-text-secondary);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }

        .field-value-text {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--color-text);
        }

        .cas-value {
            font-family: 'Inter', monospace;
            background: var(--color-bg-soft);
            padding: 0.25rem 0.65rem;
            border-radius: var(--radius-sm);
            font-weight: 600;
            color: var(--color-primary);
            font-size: 0.9rem;
        }

        .formula-value {
            font-family: 'Times New Roman', serif;
            font-style: italic;
            font-size: 1.05rem;
            color: var(--color-secondary);
            font-weight: 600;
        }

        .click-hint-text {
            color: var(--color-primary);
            font-size: 0.86rem;
            font-weight: 600;
            margin-top: 0.8rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }

        /* ====== 空状态 ====== */
        .empty-state-box {
            text-align: center;
            padding: 3.5rem 2rem;
            background: var(--color-bg-card);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
        }

        .empty-icon-large {
            font-size: 4rem;
            color: var(--color-text-placeholder);
            margin-bottom: 1.2rem;
        }

        .empty-title-text {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--color-text);
            margin-bottom: 0.6rem;
        }

        .empty-desc-text {
            font-size: 0.95rem;
            color: var(--color-text-secondary);
            max-width: 450px;
            margin: 0 auto 1.2rem;
            line-height: 1.6;
        }

        /* ====== 加载提示（B 方案：局部骨架，不再全屏遮挡） ====== */
        /* 原为 position:fixed + inset:0 + 92% 白底 + blur，查询时会铺满视口，
           观感等同整页刷新。改为结果区内的轻量内联提示，主界面始终可见。 */
        .loading-overlay {
            position: fixed;
            left: 50%;
            bottom: 32px;
            transform: translateX(-50%) translateY(8px);
            background: rgba(31, 45, 61, 0.92);
            color: #fff;
            border-radius: 999px;
            padding: 0.55rem 1.15rem;
            z-index: 9999;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity .18s ease, transform .18s ease, visibility .18s;
        }

        .loading-overlay.show {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        /* 药丸提示里的转圈缩小，适配小尺寸 */
        .loading-overlay .spinner-green {
            width: 16px;
            height: 16px;
            border-width: 2px;
            border-color: rgba(255, 255, 255, 0.35);
            border-top-color: #fff;
        }

        .loading-overlay .loading-msg {
            font-size: 0.86rem;
            line-height: 1;
            white-space: nowrap;
        }

        .spinner-green {
            width: 52px;
            height: 52px;
            border: 4px solid var(--color-border);
            border-top-color: var(--color-primary);
            border-radius: 50%;
            animation: spin 0.75s linear infinite;
        }

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

        .loading-msg {
            font-size: 1rem;
            font-weight: 600;
            color: var(--color-text-secondary);
        }

        /* ====== Toast通知 ====== */
        .toast-container-custom {
            position: fixed;
            top: 80px;
            right: 24px;
            z-index: 10000;
        }

        .toast-custom {
            background: white;
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--color-border);
            overflow: hidden;
            animation: slideInRight 0.3s ease;
        }

        @keyframes slideInRight {
            from { opacity: 0; transform: translateX(80px); }
            to { opacity: 1; transform: translateX(0); }
        }

        .toast-header-custom {
            background: transparent;
            border-bottom: 1px solid var(--color-border);
            padding: 0.85rem 1.2rem;
            font-weight: 700;
            font-size: 0.92rem;
        }

        .toast-body-custom {
            padding: 0.85rem 1.2rem;
            font-weight: 500;
            font-size: 0.9rem;
        }

        /* ====== Modal弹窗 ====== */
        .modal-content-custom {
            border: none;
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-lg);
            overflow: hidden;
        }

        .modal-header-custom {
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
            color: white;
            border: none;
            padding: 1.2rem 1.5rem;
        }

        .modal-header-custom .btn-close {
            filter: brightness(0) invert(1);
        }

        .modal-title-custom {
            font-weight: 700;
            font-size: 1.15rem;
        }

        .modal-body-custom {
            padding: 1.5rem;
        }

        /* ====== 详情表格 ====== */
        .detail-table {
            width: 100%;
            table-layout: fixed;      /* 固定布局：内容不再撑宽表格 */
            border-collapse: separate;
            border-spacing: 0;
            margin-bottom: 1.2rem;
        }

        .detail-table tr {
            transition: background 0.18s ease;
        }

        .detail-table tr:hover {
            background: var(--color-bg-soft);
        }

        .detail-table td {
            padding: 0.72rem 0.9rem;
            border-bottom: 1px solid var(--color-border);
            font-size: 0.92rem;
        }

        .detail-table td:first-child {
            font-weight: 700;
            color: var(--color-text-secondary);
            width: 32%;
            background: rgba(245,247,250,0.6);
            /* 标签列也允许折行，避免挤压值列 */
            word-break: break-word;
            overflow-wrap: anywhere;
        }

        .detail-table td:last-child {
            font-weight: 600;
            color: var(--color-text);
            width: 68%;
            /* 关键：超长无空格串（聚合物英文名/中文长名）强制折行，不再溢出到右栏 */
            word-break: break-word;
            overflow-wrap: anywhere;
            white-space: normal;
            line-height: 1.6;
        }

        /* ====== 超长名称字段：独立整行展示 ====== */
        .detail-table.detail-table-wide td:first-child {
            width: 18%;               /* 整行模式下标签收窄，给内容更多空间 */
        }

        .detail-table.detail-table-wide td:last-child {
            width: 82%;
        }

        /* 名称区在小屏下也保持可读 */
        @media (max-width: 991.98px) {
            .detail-table.detail-table-wide td:first-child { width: 26%; }
            .detail-table.detail-table-wide td:last-child  { width: 74%; }
        }

        /* ====== 分子结构图容器 ====== */
        .structure-box {
            text-align: center;
            padding: 1.5rem;
            background: var(--color-bg-page);
            border: 2px dashed var(--color-border);
            border-radius: var(--radius-lg);
            margin: 1.2rem 0;
        }

        .structure-img {
            max-width: 100%;
            height: auto;
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-sm);
        }

        .structure-error-msg {
            color: var(--color-text-secondary);
            font-weight: 600;
        }

        /* ====== 文件上传拖放区 ====== */
        .upload-dropzone {
            border: 2px dashed var(--color-border) !important;
            border-radius: var(--radius-lg);
            padding: 2.5rem 1.5rem;
            text-align: center;
            background: var(--color-bg-page);
            cursor: pointer;
            transition: all 0.25s ease;
        }

        .upload-dropzone:hover,
        .upload-dropzone.drag-active {
            border-color: var(--color-primary) !important;
            background: var(--color-bg-soft);
            box-shadow: 0 0 0 4px rgba(0, 153, 68, 0.1);
        }

        .upload-dropzone.drag-active .upload-icon-large {
            color: var(--color-primary);
        }

        .upload-icon-large {
            font-size: 3rem;
            color: var(--color-text-placeholder);
        }

        /* ====== 响应式设计 ====== */
        @media (max-width: 992px) {
            .page-title { font-size: 1.5rem; }
            .page-subtitle { font-size: 0.92rem; }
            .header-stats { gap: 1rem; }
            .header-stat-item { padding: 0.5rem 1rem; }
            .header-stat-number { font-size: 1.25rem; }
        }

        @media (max-width: 768px) {
            .main-container { padding: 1rem; }
            .page-header { padding: 1rem 1.1rem; }
            .results-header-bar { flex-direction: column; }
            .results-stats-group { justify-content: center; }
            .result-fields-grid { grid-template-columns: 1fr; }
            .search-card-body { padding: 1rem; }
        }

        @media (max-width: 576px) {
            /* P2 修复：375×667 下搜索输入框完整进入首屏（目标 top ≤ 600）
               统计数字/公告位信息全部保留，仅压缩尺寸与间距 */
            .navbar { padding-top: 0.15rem; padding-bottom: 0.15rem; }
            .navbar .navbar-brand { font-size: 0.95rem; }
            .main-container { padding: 0.6rem; }
            .page-header { padding: 0.5rem 0.75rem; margin-bottom: 0.5rem; border-radius: var(--radius-md); }
            .page-title { font-size: 1.02rem; }
            .page-subtitle { font-size: 0.7rem; margin-bottom: 0.25rem; }
            .header-stats { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0.25rem; }
            .header-stat-item { width: auto; padding: 0.2rem 0.4rem; gap: 0.25rem; border-radius: 7px; }
            .header-stat-number { font-size: 0.8rem; }
            .header-stat-label { font-size: 0.58rem; }
            .database-selector { padding: 0.5rem 0.6rem; margin-bottom: 0.5rem; border-radius: var(--radius-md); }
            .selector-title { font-size: 0.74rem; margin-bottom: 0.25rem; }
            .db-tag-list { gap: 0.25rem; }
            .db-tag { padding: 0.2rem 0.45rem; font-size: 0.66rem; gap: 0.2rem; border-width: 1.5px; }
            .db-tag i { font-size: 0.7rem; }
            /* 375px 下 4 个标签会换行：缩写再收一档，避免每颗胶囊过宽 */
            .db-tag-abbr { font-size: 0.58rem; padding: 0.02rem 0.24rem; }
            .db-version-note { margin-top: 0.25rem; font-size: 0.58rem; line-height: 1.35; }
            .search-card-header { padding: 0.45rem 0.7rem; }
            .search-card-title { font-size: 0.88rem; }
            .search-card-body { padding: 0.5rem 0.6rem 0.8rem; }
            .nav-tabs-custom { margin-bottom: 0.5rem; }
            .nav-tab-btn { padding: 0.38rem 0.45rem !important; font-size: 0.72rem; }
            .query-input-wrap .form-label { margin-bottom: 0.15rem !important; font-size: 0.74rem; }
            .btn-primary-green, .btn-secondary-green { width: 100%; }
        }

        /* ====== T12b UI 对齐改版：新分区样式（只追加，不改现有变量） ====== */
        :root {
            --banner-grad-a: #3f9b64;   /* 横幅渐变起：与搜索按钮同款 */
            --banner-grad-b: #2f7d4f;   /* 横幅渐变止：与搜索按钮同款 */
            --footer-bg: #213612;       /* 页脚深绿 */
            --footer-text: rgba(255,255,255,.75);
            --section-max-w: 1280px;    /* 整站容器统一宽度 */
            --radius-card: 16px; --radius-search: 24px; --radius-tile: 12px;
            --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 40px;
            /* ====== 全站字号体系 ======
               一级 fs-display：首页 slogan（28px）
               二级 fs-h1：页面主标题 / 各模块页头（24px）
               三级 fs-h2：区块标题（20px）
               四级 fs-h3：卡片/小节标题（16px）
               五级 fs-body：正文与控件（14px），辅助文字 12px */
            --fs-display: 32px;
            --fs-h1: 24px;
            --fs-h2: 20px;
            --fs-h3: 16px;
            --fs-body: 14px;
            --fs-small: 12px;
        }

        /* ① 顶部：通栏白色导航条 */
        .site-nav { background: #fff; box-shadow: 0 1px 0 var(--color-border), 0 2px 10px rgba(0,0,0,.04); position: sticky; top: 0; z-index: 1030; height: 88px; }
        .site-nav-inner { width: 100%; height: 100%; position: relative; display: flex; align-items: center; }
        .site-brand { position: absolute; left: 76px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.08rem; color: var(--color-text); letter-spacing: -0.3px; white-space: nowrap; text-decoration: none; margin: 0; }
        .nar-logo { height: 68px; width: auto; display: block; border-radius: 4px; }
        .site-brand-divider { width: 1px; height: 44px; background: var(--color-border); }
        /* fix75：站点名后缀（可选，后台「站点外观」里填，留空则不渲染） */
        .site-brand-sub { font-weight: 500; font-size: 0.82rem; color: var(--color-text-secondary); margin-left: 0.15rem; }
        .site-brand-icon { display: block; }
        .site-nav-menu { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; margin: 0; }
        .site-nav-menu .nav-item { display: flex; align-items: center; }
        .module-link {
            display: inline-flex; align-items: center; justify-content: center;
            min-width: 150px; padding: 0 1.7rem; height: 88px;
            font-weight: 700; font-size: 1.35rem;   /* 字号与 logo 图幅相称 */
            color: var(--color-text-regular);
            border-radius: 0; position: relative;
            transition: color .18s ease;
        }
        .module-link:hover { color: var(--color-primary); }
        /* 窄屏防重叠：品牌行过宽时收起平台名文字、缩小 NAR logo */
        @media (max-width: 1500px) {
            .module-link { font-size: 1.15rem; padding: 0 1.05rem; }
        }
        @media (max-width: 1420px) {
            .site-brand > span:last-of-type { font-size: 0.92rem; }
            .nar-logo { height: 48px; }
            .site-brand { left: 20px; gap: 0.4rem; }
            .module-link { font-size: 1.1rem; padding: 0 1.05rem; }
        }
        @media (max-width: 1150px) {
            .nar-logo { height: 40px; }
            .site-brand > span:last-of-type { font-size: 0.85rem; }
            .module-link { font-size: 1.05rem; padding: 0 0.9rem; }
        }
        .module-link.active { color: var(--color-primary); box-shadow: inset 0 -3px 0 var(--color-primary); }
        .nav-user { position: absolute; right: 76px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; }
        .site-nav-toggler { border-color: var(--color-border); position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); }
        /* 渐变壳：承载横幅标题/搜索卡/统计条（nav 通栏白条在其上方）
           叠加主题装饰层（分子线框/原子轨道/化学式），渐变加光斑增强层次 */
        .top-shell {
            position: relative;
            overflow: hidden;
            background:
                radial-gradient(ellipse 620px 320px at 12% -8%, rgba(255,255,255,0.14), transparent 62%),
                radial-gradient(ellipse 700px 420px at 96% 108%, rgba(0, 40, 20, 0.32), transparent 65%),
                linear-gradient(135deg, var(--banner-grad-a) 0%, var(--banner-grad-b) 100%);
        }
        .hero-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
        .deco-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
        .deco-formula {
            position: absolute; font-weight: 800; color: #fff;
            font-family: Georgia, 'Times New Roman', serif;
            pointer-events: none; user-select: none;
        }
        .df-1 { font-size: 3.4rem; top: 12%; left: 4%; opacity: 0.07; transform: rotate(-12deg); }
        .df-2 { font-size: 2.2rem; top: 58%; left: 12%; opacity: 0.06; transform: rotate(9deg); }
        .df-3 { font-size: 2.6rem; top: 66%; right: 6%; opacity: 0.07; transform: rotate(-8deg); }
        .df-4 { font-size: 2rem; top: 20%; right: 26%; opacity: 0.055; transform: rotate(14deg); }
        .site-banner { position: relative; z-index: 1; }
        @media (max-width: 767px) {
            .deco-formula { display: none; }
            .deco-benzene, .deco-dots { opacity: 0.09; }
        }
        @media (max-width: 1439px) { .site-brand { left: 28px; } .nav-user { right: 28px; } }
        @media (max-width: 991px) {
            .site-nav { height: auto; }
            .site-brand { position: static; transform: none; padding: 0.55rem 1rem; }
            .site-nav-menu { position: static; transform: none; flex-direction: column; align-items: flex-start; width: 100%; margin: 0.5rem 0 0; }
            .module-link { height: auto; padding: 0.6rem 0.4rem; width: 100%; }
            .module-link.active { box-shadow: inset 3px 0 0 var(--color-primary); }
            .nav-user { position: static; transform: none; padding: 0.5rem 1rem; }
            .site-nav-toggler { position: static; transform: none; margin-left: auto; }
        }
        /* 资讯中心 */
        .news-card {
            background: #fff; border: 1px solid var(--color-border);
            border-radius: var(--radius-card, 16px); box-shadow: 0 3px 14px rgba(15, 60, 30, .04);
            padding: var(--sp-3, 1.5rem);
        }
        .news-sub-title {
            font-size: 1.08rem; font-weight: 800; color: var(--color-text);
            border-left: 4px solid var(--color-primary); padding-left: .7rem;
            margin-bottom: .9rem;
        }
        .news-sub-gap { margin-top: 1.8rem; }
        .news-cats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 1.4rem; }
        @media (max-width: 767px) { .news-cats-grid { grid-template-columns: 1fr; } }
        .news-block {
            background: #fff; border: 1px solid var(--color-border); border-radius: 10px;
            padding: .8rem 1rem .4rem;
        }
        .news-block-head {
            display: flex; justify-content: space-between; align-items: center;
            margin-bottom: .3rem; padding-bottom: .4rem; border-bottom: 2px solid var(--color-divider, #F3F4F6);
        }
        .news-block-name { font-weight: 800; font-size: .98rem; color: var(--color-primary); text-decoration: none; }
        .news-block-name:hover { text-decoration: underline; }
        .news-block-more { font-size: .8rem; color: var(--color-text-secondary); text-decoration: none; }
        .news-block-more:hover { color: var(--color-primary); }
        .news-block-row {
            display: flex; align-items: center; gap: .65rem;
            padding: .5rem 0; border-bottom: 1px dashed var(--color-border); text-decoration: none;
        }
        .news-block-row:last-child { border-bottom: none; }
        .news-row-thumb {
            flex: 0 0 auto; width: 76px; height: 54px; object-fit: cover;
            border-radius: 6px; background: var(--color-bg-soft, #eaf4ee);
        }
        .news-row-main { flex: 1 1 auto; min-width: 0; }
        .news-row-title {
            font-size: .9rem; line-height: 1.45; color: var(--color-text);
            display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
        }
        .news-block-row:hover .news-row-title { color: var(--color-primary); }
        .pill-round-btn:active { transform: scale(0.96); }
        .news-item-date { flex: 0 0 auto; font-size: .78rem; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
        .news-item-title { font-size: .88rem; line-height: 1.45; color: var(--color-text); }
        .news-item-title a { color: var(--color-text); text-decoration: none; }
        .news-item-title a:hover { color: var(--color-primary); }
        .news-latest-row {
            display: flex; align-items: baseline; gap: .8rem;
            padding: .6rem .2rem; border-bottom: 1px dashed var(--color-border); text-decoration: none;
        }
        .news-latest-row:hover .news-item-title a { color: var(--color-primary); }
        .news-latest-date { flex: 0 0 auto; font-size: .8rem; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
        .news-latest-cat {
            flex: 0 0 auto; font-size: .75rem; color: var(--color-primary);
            background: var(--color-bg-soft, #eaf4ee); border-radius: 999px; padding: .1rem .6rem;
        }
        .news-latest-row .news-item-title { flex: 1 1 auto; }
        .news-loading { color: var(--color-text-secondary); padding: 2rem 0; text-align: center; }
        /* 最新更新：左右两列竖向排列 */
        .news-latest-list {
            display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
            grid-auto-flow: column; grid-template-rows: repeat(5, auto);
            gap: 0 1.6rem; align-content: start;
        }
        @media (max-width: 767px) {
            .news-latest-list { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; }
        }

        /* 化学式显示规范：禁斜体、数字下标 */
        .btn-outline-green {
            --bs-btn-color: var(--color-primary);
            --bs-btn-border-color: var(--color-primary);
            --bs-btn-hover-color: #fff;
            --bs-btn-hover-bg: var(--color-primary);
            --bs-btn-hover-border-color: var(--color-primary);
            --bs-btn-active-color: #fff;
            --bs-btn-active-bg: var(--color-primary);
            --bs-btn-active-border-color: var(--color-primary);
        }
        .field-value-text, .results-table td, .modal .table td { overflow-wrap: anywhere; word-break: break-word; }
        .formula-value, .chem-formula { font-style: normal !important; font-family: var(--ff-body, inherit); }
        .formula-value sub, .chem-formula sub { font-size: 0.72em; line-height: 0; }

        /* 模块视图（iframe 单页呈现）——高度由 JS 按内容自适应（sizeModuleFrame），
           使外层页面成为统一长文档：滚动时绿 banner 随页面滚走，内容不会被 banner 遮挡 */
        .module-frame iframe {
            display: block; width: 100%; height: 720px; min-height: 520px;
            border: none; background: #fff;
        }
        /* 非 home 模块时收起搜索卡与统计条，内容区最大化（顶部仅保留导航+标题，跨模块一致） */
        body.module-nonhome .banner-search-card,
        body.module-nonhome .header-stats { display: none !important; }
        body.module-nonhome .top-shell { display: none !important; }
        /* 子页面 embed 模式（?embed=1）：隐藏自身导航与页脚 */
        .embed-mode .site-nav, .embed-mode .site-footer, .embed-mode .navbar-main { display: none !important; }
        .embed-mode .main-container, .embed-mode .wrap { padding-top: 1rem !important; }

        /* ② 绿渐变由 .top-shell 提供；banner 本体透明，仅排布标题/搜索卡/统计条
              标题与搜索框整体下移 2cm（≈76px） */
        .site-banner {
            /* slogan 上下间距约 1.5cm */
            padding: 1.1cm var(--sp-2) 0.8cm;
        }
        .site-banner-inner { max-width: var(--section-max-w); margin: 0 auto; text-align: center; color: #fff; }
        /* 标题专用字体：思源宋体 Black 子集（仅含标题字符，5.4KB 自托管，OFL 开源可商用；
           字符集："化学品合规数据，一查即知。、 "——改标题文案需重新子集化，脚本备注见台账） */
        @font-face {
            font-family: 'Hero Serif SC';
            src: url('../vendor/fonts/NotoSerifSC-Black-hero.woff2') format('woff2');
            font-weight: 900;
            font-style: normal;
            font-display: swap;
        }
        .site-banner-title {
            font-family: 'Hero Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
            font-size: var(--fs-display, 32px);
            font-weight: 900;
            letter-spacing: 3px;
            margin-bottom: 0.5rem;
            text-shadow: 0 2px 10px rgba(0,0,0,.25);
        }
        .site-banner-subtitle { font-size: 0.98rem; opacity: 0.92; margin-bottom: 0.9cm; }
        /* fix43：配合 gotoTab 的 block:"start" —— 抵消 88px 的 sticky 导航（.site-nav） */
        .banner-search-card {
            background: #fff;
            border-radius: var(--radius-search);
            box-shadow: 0 10px 28px rgba(0, 60, 25, 0.16);
            text-align: left;
            padding: var(--sp-3);
            /* fix43：scrollIntoView({block:"start"}) 时预留 96px = 88px sticky 导航 + 8px 余量，
               否则卡片顶边会被 .site-nav 盖住（原来用 block:"center" 就是在绕这个问题，
               代价是卡片停在视口中间、看着像没跳到位）。 */
            scroll-margin-top: 96px;
        }
        .banner-search-card .nav-tabs-custom { margin-bottom: 1rem; }
        /* 单条查询/批量文本/Excel上传 标签文字用黑色 */
        .banner-search-card .nav-tab-btn { color: var(--color-text) !important; }
        .banner-search-card .nav-tab-btn:hover, .banner-search-card .nav-tab-btn.active { color: var(--color-primary) !important; }
        /* 胶囊搜索行（对齐合规化学：大圆角输入框 + 圆形搜索按钮） */
        .pill-search-row { display: flex; gap: 0.8rem; align-items: center; }
        .pill-search-row .pill-input-wrap { position: relative; flex: 1 1 auto; min-width: 0; }
        .pill-search-row .form-control-lg { height: 46px; border-radius: 999px; padding: 0 1.3rem; font-size: 0.98rem; border: 1.5px solid var(--color-border); box-shadow: none; }
        .pill-search-row .form-control-lg:focus { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(0,153,68,.10); }
        .pill-round-btn {
            flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: none;
            background: linear-gradient(135deg, #3f9b64, #2f7d4f); color: #fff; font-size: 1.25rem;
            display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
            box-shadow: 0 8px 18px rgba(0,153,68,.35); transition: transform .15s ease, box-shadow .15s ease;
        }
        .pill-round-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,153,68,.42); color: #fff; }
        .pill-sub-row { display: flex; gap: 0.6rem 0.7rem; margin-top: 0.75rem; flex-wrap: wrap; align-items: center; }
        /* 高级选项折叠（搜索栏极简化：默认只露输入框+按钮，对齐合规化学简洁度） */
        .pill-advanced { width: 100%; }
        .pill-advanced summary {
            display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer;
            color: var(--color-text-secondary); font-size: 0.88rem; font-weight: 400;
            list-style: none; user-select: none;
        }
        .pill-advanced summary::-webkit-details-marker { display: none; }
        .pill-advanced summary:hover, .pill-advanced[open] summary { color: var(--color-primary); }
        .pill-advanced summary i { font-size: 0.95rem; }
        .pill-sub-inner { display: flex; gap: 0.6rem 0.7rem; flex-wrap: wrap; align-items: center; margin-top: 0.65rem; }
        .pill-sub-inner .form-select {
            width: auto; min-width: 150px; border-radius: 999px; padding: 0.4rem 2.1rem 0.4rem 1.05rem;
            font-size: 0.88rem; border: 1px solid var(--color-border); background-color: #fff; height: auto;
        }
        .pill-sub-inner .pill-sub-label { display: inline-flex; margin: 0; font-size: 0.85rem; color: var(--color-text-secondary); font-weight: 400; white-space: nowrap; }
        @media (max-width: 767px) {
            .pill-search-row .form-control-lg { height: 48px; }
            .pill-round-btn { width: 48px; height: 48px; font-size: 1.15rem; }
        }
        /* 公告条（对齐合规化学"热点公告"样式） */
        .notice-bar {
            display: flex; align-items: center; gap: 0.8rem;
            border-bottom: 1px solid var(--color-border);
            padding: 0.15rem 0.2rem 0.9rem; margin-bottom: var(--sp-2);
        }
        .notice-bar .notice-icon { color: #e8543f; font-size: 1.05rem; flex: 0 0 auto; }
        .notice-bar .notice-label { font-weight: 700; color: var(--color-text); white-space: nowrap; font-size: 0.92rem; }
        .notice-bar .notice-text { color: var(--color-text-secondary); font-size: 0.9rem; overflow: hidden; flex: 1 1 auto; min-width: 0; white-space: nowrap; }
        /* 公告滚动 */
        .notice-track { display: inline-block; white-space: nowrap; will-change: transform; }
        .notice-track .notice-sep { margin: 0 1.6rem; color: var(--color-border); }
        .notice-track a { color: var(--color-text-secondary); text-decoration: none; }
        .notice-track a:hover { color: var(--color-primary); }
        @keyframes noticeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
        .notice-track.scrolling { animation: noticeScroll 30s linear infinite; }
        .notice-bar:hover .notice-track.scrolling { animation-play-state: paused; }
        .notice-bar .notice-more { color: var(--color-text-secondary); font-weight: 600; font-size: 0.88rem; text-decoration: none; white-space: nowrap; }
        .notice-bar .notice-more:hover { color: var(--color-primary); }
        @media (max-width: 575px) { .notice-bar .notice-text { white-space: normal; } }
        /* 库选择器折叠（卡内底部） */
        .db-collapse { margin-top: 0.9rem; border: 1px solid var(--color-border); border-radius: var(--radius-tile); overflow: hidden; }
        .db-collapse-toggle {
            width: 100%; display: flex; justify-content: space-between; align-items: center;
            background: var(--color-bg-soft); border: none; padding: 0.55rem 0.9rem;
            font-weight: 600; color: var(--color-text); font-size: 0.9rem; cursor: pointer;
        }
        .db-collapse-toggle:hover { background: #eaf4ee; }
        .db-collapse-body { padding: 0.6rem 0.8rem 0.8rem; background: #fff; }
        .db-selector-embedded { border: none; padding: 0; margin: 0; box-shadow: none; background: transparent; color: var(--color-text); }
        /* ③ 统计条（横幅下缘，白字半透明） */
        /* 统计条与搜索卡保持约 1cm 间距 */
        .site-banner-stats { justify-content: center; gap: 1.2rem; margin-top: 10px; flex-wrap: wrap; }
        .site-banner-stats .header-stat-item { background: rgba(255,255,255,.14); padding: 0.4rem 1rem; gap: 0.5rem; }
        .site-banner-stats .header-stat-number { font-size: 1.2rem; }
        .site-banner-stats .header-stat-label { font-size: 0.8rem; }

        /* ④ 白底功能区 */
        .site-section { max-width: var(--section-max-w); margin: 0 auto 72px; }
        .section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 1.1rem; }
        .section-head .section-title { font-size: 22px; font-weight: 800; color: var(--color-text); margin: 0; display: flex; align-items: center; gap: 0.5rem; text-wrap: balance; }
        .section-title-icon { color: var(--color-primary); }
        .section-link { color: var(--color-text-secondary); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
        .section-link:hover { color: var(--color-primary); }
        /* 功能入口：大圆角白卡容器 + 横向条目（对齐合规化学工具区版式）
           注：上方 574 行有旧版 .tool-portal-card（flex 单卡样式，已废弃但保留），
           此处显式 display:block 覆盖其 flex，避免布局串扰 */
        .tool-portal-card {
            display: block;
            background: #fff; border: 1px solid var(--color-border);
            border-radius: var(--radius-card); box-shadow: 0 3px 14px rgba(15, 60, 30, .04);
            padding: var(--sp-3);
        }
        .tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-1) var(--sp-2); }
        @media (max-width: 991px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 575px) { .tool-grid { grid-template-columns: 1fr; } }
        .tool-tile {
            display: flex; flex-direction: row; align-items: center; gap: 0.95rem;
            background: #fff; border: 1px solid transparent; border-radius: var(--radius-tile);
            padding: 0.8rem 0.95rem; text-decoration: none;
            transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
        }
        .tool-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 80, 35, 0.10); background: #F8FBF2; border-color: var(--color-border); }
        .tool-tile-icon {
            display: inline-flex; align-items: center; justify-content: center;
            width: 48px; height: 48px; border-radius: 13px; font-size: 1.4rem; color: #fff;
            flex: 0 0 auto; box-shadow: 0 6px 14px rgba(15, 60, 30, 0.16);
        }
        .tool-tile-name { font-weight: 700; color: var(--color-text); font-size: 1.02rem; }
        .tool-tile-desc { color: var(--color-text-secondary); font-size: 0.85rem; line-height: 1.5; }
        .tool-tile-body { flex: 1 1 auto; min-width: 0; }

        /* 数据库最近更新（对齐合规化学"最近更新"区，数据全部来自库元数据，无杜撰） */
        .db-updates-card {
            background: #fff; border: 1px solid var(--color-border);
            border-radius: var(--radius-card); box-shadow: 0 6px 24px rgba(15, 60, 30, .06);
            padding: var(--sp-2) var(--sp-3);
        }
        .db-update-item {
            display: flex; justify-content: space-between; align-items: center; gap: 1rem;
            padding: 0.7rem 0.2rem; border-bottom: 1px dashed var(--color-border);
        }
        .db-update-item:last-child { border-bottom: none; }
        .db-update-name { font-weight: 600; color: var(--color-text); font-size: 0.95rem; display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
        .db-update-name .result-db-badge { flex: 0 0 auto; }
        .db-update-meta { color: var(--color-text-secondary); font-size: 0.86rem; white-space: nowrap; }
        .db-update-date { color: var(--color-text-secondary); font-size: 0.82rem; display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
        @media (max-width: 575px) { .db-update-item { flex-wrap: wrap; gap: 0.3rem; } }

        /* ⑤ 深绿页脚 */
        .site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: var(--sp-4); }
        .site-footer-inner { max-width: var(--section-max-w); margin: 0 auto; padding: var(--sp-4) var(--sp-2) var(--sp-2); }
        .site-footer-cols { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: var(--sp-3); }
        @media (max-width: 767px) { .site-footer-cols { grid-template-columns: 1fr; } }
        .site-footer-logo { display: flex; align-items: center; gap: 0.5rem; color: #fff; font-weight: 800; font-size: 1.05rem; margin-bottom: 0.6rem; }
        /* 页脚简介/联系块宽度约束，避免长行撑满 */
        .site-footer-desc { font-size: 0.85rem; line-height: 1.8; margin: 0; max-width: 380px; overflow-wrap: break-word; }
        .site-footer-heading { color: #fff; font-size: 0.95rem; font-weight: 700; margin-bottom: 0.7rem; }
        .site-footer-col a { display: block; color: var(--footer-text); text-decoration: none; font-size: 0.88rem; margin-bottom: 0.45rem; }
        .site-footer-col a:hover { color: #fff; text-decoration: underline; }
        .site-footer-text { font-size: 0.85rem; line-height: 1.9; margin: 0; max-width: 320px; overflow-wrap: break-word; }
        .site-footer-bottom {
            border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--sp-3); padding-top: var(--sp-2);
            display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
            font-size: 0.8rem; color: rgba(255,255,255,.55);
        }
        .site-footer-icp { color: rgba(255,255,255,.45); }

        /* T12b 移动端：375×667 搜索卡完整进首屏（横幅内卡片已居中，压缩横幅与卡内边距） */
        @media (max-width: 576px) {
            .site-banner { padding: var(--sp-2) 0.7rem var(--sp-2); }
            .site-banner-title { font-size: 1.6rem; margin-bottom: 0.3rem; letter-spacing: 2px; }
            .site-banner-subtitle { font-size: 0.78rem; margin-bottom: var(--sp-2); }
            .banner-search-card { padding: 0.8rem 0.7rem; border-radius: var(--radius-card); }
            .banner-search-card .nav-tabs-custom { margin-bottom: 0.6rem; }
            .site-banner-stats { margin-top: var(--sp-2); gap: 0.35rem; }
            .site-banner-stats .header-stat-item { padding: 0.25rem 0.55rem; }
            .site-banner-stats .header-stat-number { font-size: 0.9rem; }
            .site-banner-stats .header-stat-label { font-size: 0.66rem; }
            .section-head { margin: var(--sp-2) 0 var(--sp-1); }
            .site-footer-inner { padding: var(--sp-3) 0.9rem var(--sp-2); }
        }

        /* ====== 滚动条美化 ====== */
        ::-webkit-scrollbar { width: 7px; height: 7px; }
        ::-webkit-scrollbar-track { background: var(--color-bg-page); border-radius: 3px; }
        ::-webkit-scrollbar-thumb { background: #c3cfc8; border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: #8a9a91; }
    
        .pubchem-badge { display:inline-block; font-size:0.7rem; font-weight:500; padding:0.15rem 0.5rem; border-radius:10px; margin-left:0.5rem; vertical-align:middle; background:#eaf4ee; color:#5a6b60; }
        .pubchem-badge.ok { background:#e6f4ea; color:#215c3a; }
        .pubchem-badge.err { background:#fdecea; color:#c0392b; }
        .structure-error-msg { color:#c0392b; background:#fdecea; border-radius:6px; padding:0.75rem 1rem; font-size:0.9rem; }

        .btn-user-main { background:#fff; color:var(--color-primary); border:1px solid var(--color-primary); border-radius:8px; font-weight:500; padding:0.4rem 0.9rem; }
        .btn-user-main:hover, .btn-user-main:focus { background:var(--color-primary); color:#fff; }
        .role-chip { font-size:0.68rem; padding:0.1rem 0.5rem; border-radius:10px; margin-left:0.45rem; font-weight:600; vertical-align:middle; }
        .role-admin { background:#215c3a; color:#fff; }
        .role-user { background:#2f7d4f; color:#fff; }
        .role-guest { background:#8a8a8a; color:#fff; }
        .dropdown-menu { border-radius:10px; border:1px solid var(--color-border); box-shadow:0 8px 24px rgba(0,0,0,0.12); }

        .ghs-signal { display:inline-block; font-weight:600; font-size:0.85rem; color:#9a3412; background:#fff3e6; border:1px solid #f3c79a; border-radius:6px; padding:0.2rem 0.6rem; }
        .ghs-codes { display:flex; flex-wrap:wrap; gap:0.4rem; margin-bottom:0.6rem; }
        .ghs-code-badge { display:inline-block; font-family:ui-monospace,Menlo,Consolas,monospace; font-weight:700; font-size:0.8rem; color:#7a1f1f; background:#fdecec; border:1px solid #f1b0b0; border-radius:6px; padding:0.15rem 0.5rem; }
        .ghs-statements { margin:0; padding-left:1.1rem; font-size:0.85rem; color:#444; line-height:1.6; }
        .ghs-statements li { margin-bottom:0.2rem; }

        /* ====== 搜索结论横幅（T03：✔已列入 / ✘未列入 / ◐模糊软提示） ====== */
        .verdict-ok, .verdict-no, .verdict-maybe {
            border-radius: var(--radius-lg);
            padding: 1rem 1.4rem;
            font-size: 1.02rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            line-height: 1.7;
            overflow-wrap: anywhere; word-break: break-word; min-width: 0;
        }
        .verdict-ok    { background: #e6f4ea; border: 1.5px solid #215c3a; color: #215c3a; }
        .verdict-no    { background: #fdecea; border: 1.5px solid #c0392b; color: #c0392b; }
        .verdict-maybe { background: #fff8e6; border: 1.5px solid #e6a23c; color: #9a6700; }
        .verdict-ok .verdict-cas, .verdict-no .verdict-cas {
            font-family: 'Inter', monospace; font-weight: 700;
        }
        .verdict-scope-line { font-size: 0.88rem; font-weight: 500; opacity: 0.92; }

        /* ====== 联想下拉（T04） ====== */
        .query-input-wrap { position: relative; }
        .suggest-dropdown {
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            right: 0;
            z-index: 1050;
            background: var(--color-bg-card);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-lg);
            max-height: 40vh;
            overflow-y: auto;
            display: none;
        }
        .suggest-dropdown.open { display: block; }
        .suggest-item {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0.55rem 0.9rem;
            cursor: pointer;
            font-size: 0.92rem;
            border-bottom: 1px solid var(--color-bg-page);
        }
        .suggest-item:last-child { border-bottom: none; }
        .suggest-item:hover, .suggest-item.active { background: var(--color-bg-soft); }
        .suggest-item .suggest-cas {
            font-family: 'Inter', monospace;
            font-weight: 600;
            color: var(--color-primary);
            font-size: 0.84rem;
            white-space: nowrap;
        }
        .suggest-item .suggest-cn { font-weight: 600; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .suggest-item .suggest-en { color: var(--color-text-secondary); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .suggest-empty { padding: 0.7rem 0.9rem; color: var(--color-text-placeholder); font-size: 0.88rem; }
        /* 长名称省略号（flex 子项需 min-width:0 才生效）与关键词高亮 */
        .suggest-item .suggest-cn { flex: 1 1 auto; min-width: 0; }
        .suggest-item .suggest-en { flex: 0 1 auto; min-width: 0; max-width: 40%; }
        .suggest-item > i { flex: 0 0 auto; color: var(--color-text-placeholder); font-size: 0.85rem; }
        .suggest-item mark { background: rgba(255, 205, 0, .32); color: inherit; padding: 0 1px; border-radius: 2px; }

        /* ====== 批量逐词分组（T05） ====== */
        .batch-group-card {
            background: var(--color-bg-card);
            border: 1px solid var(--color-border);
            border-left: 4px solid var(--color-primary);
            border-radius: var(--radius-lg);
            padding: 1.1rem 1.3rem;
            margin-bottom: 0.9rem;
            box-shadow: var(--shadow-sm);
        }
        .batch-group-card.not-listed { border-left-color: #c0392b; background: #fffafa; }
        .batch-group-head {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            flex-wrap: wrap;
            gap: 0.6rem;
            margin-bottom: 0.6rem;
        }
        .batch-group-term { font-size: 1.05rem; font-weight: 700; color: var(--color-text); word-break: break-all; }
        .batch-verdict-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.3rem 0.85rem;
            border-radius: 50px;
            font-size: 0.85rem;
            font-weight: 700;
            white-space: nowrap;
        }
        .batch-verdict-badge.ok { background: #e6f4ea; color: #215c3a; border: 1px solid #215c3a; }
        .batch-verdict-badge.no { background: #fdecea; color: #c0392b; border: 1px solid #c0392b; }
        .batch-hit-line { font-size: 0.92rem; color: var(--color-text-regular); margin-bottom: 0.4rem; }
        .batch-hit-line .cas-value { margin: 0 0.3rem; }

        /* 命中行内元素：CAS 徽章 / 中文名 / 英文名 / 查看详情（对齐 8901 batch-hit-line） */
        .batch-hit-line .cas-value {
            display: inline-block;
            padding: 0.14rem 0.5rem;
            border-radius: 5px;
            background: #eaf4ee;
            color: var(--color-primary-hover, #215c3a);
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: 0.85rem;
            font-weight: 700;
            letter-spacing: 0.01em;
            white-space: nowrap;
        }
        .batch-hit-name { font-weight: 600; color: var(--color-text); }
        .batch-hit-en { color: var(--color-text-secondary); }
        .batch-detail-link {
            margin-left: 0.55rem;
            color: var(--color-primary);
            font-size: 0.85rem;
            font-weight: 600;
            text-decoration: none;
            white-space: nowrap;
        }
        .batch-detail-link:hover { text-decoration: underline; }
        .batch-new-scope { font-size: 0.84rem; color: #b26a00; }
        .batch-none-line { color: var(--color-text-secondary); }
        /* 批量结果里的"模糊联想"（对齐 8901 的 details.batch-fuzzy） */
        details.batch-fuzzy { margin-top: 0.45rem; }
        details.batch-fuzzy > summary {
            cursor: pointer;
            color: var(--color-text-secondary);
            font-size: 0.86rem;
            font-weight: 600;
            user-select: none;
            list-style-position: outside;
        }
        details.batch-fuzzy > summary:hover { color: var(--color-primary); }
        details.batch-fuzzy .batch-fuzzy-body {
            padding: 0.45rem 0 0.1rem 1.3rem;
            font-size: 0.86rem;
            color: var(--color-text-secondary);
        }
        .batch-fuzzy .bf-inline { margin-bottom: 0.15rem; }
        .batch-fuzzy .bf-item {
            display: flex;
            gap: 0.5rem;
            align-items: baseline;
            font-size: 0.85rem;
            color: var(--color-text-secondary);
            line-height: 1.7;
        }
        .batch-fuzzy .bf-cas {
            flex: 0 0 auto;
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            color: var(--color-text-regular);
        }
        .batch-fuzzy .bf-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .batch-fuzzy .bf-detail { flex: 0 0 auto; color: var(--color-primary); text-decoration: none; }
        .batch-fuzzy .bf-detail:hover { text-decoration: underline; }
        .batch-fuzzy .bf-loading { font-size: 0.82rem; color: var(--color-text-secondary); }
        .batch-fuzzy .bf-toggle { color: var(--color-primary); font-weight: 600; font-size: 0.85rem; cursor: pointer; text-decoration: none; }
        .batch-fuzzy .bf-toggle:hover { text-decoration: underline; }
        .batch-fuzzy .bf-more { margin-top: 0.1rem; }
        .batch-fuzzy .bf-more div { margin-bottom: 0.2rem; }
        /* 关键词高亮（迁移自 8901 的 hlTerms）：联想下拉、结果卡片、详情弹窗共用一套 */
        .kw-hl,
        mark.kw-hl {
            background: #ffeb3b;
            padding: 0 1px;
            border-radius: 2px;
            color: inherit;
            font-weight: inherit;
        }

        /* ====== Excel 逐行结果（T06）与手动列面板 ====== */
        .excel-row-table { width: 100%; border-collapse: collapse; background: var(--color-bg-card); }
        .excel-row-table th, .excel-row-table td {
            border: 1px solid var(--color-border);
            padding: 0.5rem 0.7rem;
            font-size: 0.88rem;
            text-align: left;
            vertical-align: top;
        }
        .excel-row-table th { background: var(--color-bg-soft); font-weight: 700; white-space: nowrap; }
        .excel-row-table tr.row-not-listed { background: #fdf3f2; }
        .excel-col-panel {
            border: 1px solid var(--color-border);
            border-radius: var(--radius-md);
            padding: 1rem 1.2rem;
            margin-top: 1rem;
            background: var(--color-bg-page);
        }
        .excel-col-panel table { width: 100%; border-collapse: collapse; margin: 0.6rem 0; }
        .excel-col-panel th, .excel-col-panel td {
            border: 1px solid var(--color-border);
            padding: 0.4rem 0.6rem;
            font-size: 0.85rem;
            text-align: left;
        }
        .excel-col-panel th { background: white; }

        /* ====== 数据版本角标（T09） ====== */
        .db-version-note {
            margin-top: 0.6rem;
            font-size: 0.8rem;
            color: var(--color-text-secondary);
        }
        .new-use-badge {
            display: inline-block;
            background: #fff3e0;
            color: #b26a00;
            font-size: 0.65rem;
            font-weight: 600;
            padding: 0.1rem 0.5rem;
            border-radius: 10px;
            margin-left: 0.4rem;
            vertical-align: middle;
            cursor: help;
        }
/* ============================================================
 * nar 站补充样式（结果卡片 / 批量行 / 详情表 / 功能磁贴）
 * 主样式来自 8901 的 main.css，此处仅补齐 P2 新增元素的样式
 * ============================================================ */

/* ---------- 结果卡片 ---------- */
.result-card {
    background: var(--color-bg-card, #fff);
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: var(--radius-card, 16px);
    padding: 1rem 1.2rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: box-shadow .18s, border-color .18s, transform .18s;
}
.result-card:hover {
    border-color: var(--color-primary, #2f7d4f);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.result-card-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}
.result-card-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text, #1d2822);
    line-height: 1.5;
    word-break: break-all;
}
.result-card-en {
    font-size: .86rem;
    color: var(--color-text-secondary, #666);
    margin-top: .25rem;
    line-height: 1.45;
    word-break: break-all;
}
.result-card-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: .5rem;
    font-size: .82rem;
    color: var(--color-text-secondary, #666);
}
.meta-item i { margin-right: .2rem; opacity: .75; }

/* ---------- 来源徽章 ---------- */
.src-badge {
    display: inline-block;
    padding: .1rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.src-iecsc   { background: #eaf4ee; color: #215c3a; }
.src-weixian { background: #fdeceb; color: #c0392b; }
.src-iecic   { background: #eaf4ee; color: #3d5a6c; }
.src-gb9685  { background: #fff6e5; color: #b7791f; }
.src-other   { background: #f2f6f3; color: #666; }

/* ---------- 批量结果行 ---------- */
.batch-row {
    display: grid;
    grid-template-columns: 52px minmax(140px, 1.2fr) 70px 2fr;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1rem;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: 12px;
    margin-bottom: .5rem;
    background: #fff;
    font-size: .9rem;
}
.batch-row.listed { border-left: 4px solid #2f7d4f; }
.batch-row.not-listed { border-left: 4px solid #d3ddd7; }
.batch-idx { color: var(--color-text-placeholder, #999); font-variant-numeric: tabular-nums; }
.batch-term { font-weight: 600; word-break: break-all; }
.batch-status { text-align: center; font-size: 1.05rem; }
.batch-detail { color: var(--color-text-secondary, #666); font-size: .86rem; word-break: break-all; }

@media (max-width: 768px) {
    .batch-row {
        grid-template-columns: 36px 1fr 40px;
        grid-template-areas: "idx term status" ". detail detail";
        row-gap: .25rem;
    }
    .batch-idx { grid-area: idx; }
    .batch-term { grid-area: term; }
    .batch-status { grid-area: status; }
    .batch-detail { grid-area: detail; }
}

/* ---------- 结论横幅（补齐 8901 中的同款） ---------- */
.verdict-ok, .verdict-no, .verdict-maybe {
    border-radius: 12px;
    padding: .85rem 1.1rem;
    font-size: .92rem;
    line-height: 1.6;
}
.verdict-ok    { background: #eaf4ee; border: 1px solid #b7e4cc; color: #0a6b36; }
.verdict-no    { background: #fdeceb; border: 1px solid #f5c6c2; color: #a93226; }
.verdict-maybe { background: #fff6e5; border: 1px solid #f7d9a8; color: #8a5a12; }
.verdict-cas   { font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; }
.verdict-scope-line { margin-top: .35rem; font-size: .82rem; opacity: .85; }

/* ---------- 详情弹窗 ---------- */
.detail-src { margin-bottom: .9rem; }
.detail-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.detail-table td {
    padding: .6rem .8rem;
    border-bottom: 1px solid var(--color-border, #e2eae4);
    vertical-align: top;
    line-height: 1.6;
}
.detail-table td:first-child {
    width: 170px;
    color: var(--color-text-secondary, #666);
    font-weight: 600;
    white-space: nowrap;
}
.detail-table tr:last-child td { border-bottom: none; }
/* ============================================================
 * P3 详情弹窗样式（PubChem 物化性质 / GHS 安全数据 / 2D 结构图）
 * ============================================================ */

.detail-loading {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--color-text-secondary, #666);
    font-size: .9rem;
}
.detail-error {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #c0392b;
    background: #fdeceb;
    border-radius: 12px;
    font-size: .9rem;
}

/* ---------- PubChem 区块 ---------- */
.pc-section { margin-top: 1.2rem; }

.pc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.2rem 0 .7rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--color-border, #e2eae4);
}
.pc-head h6 {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-primary, #2f7d4f);
}
.pc-src {
    font-size: .75rem;
    font-weight: 400;
    color: var(--color-text-placeholder, #999);
}

/* 2D 结构图 */
.pc-structure {
    text-align: center;
    padding: 1rem;
    background: #fbfcfb;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: 12px;
    margin-bottom: 1rem;
}
.pc-structure img {
    max-width: 240px;
    width: 100%;
    height: auto;
    background: #fff;
    border-radius: 8px;
}

/* 物化性质表 */
.detail-table-pc td.mono {
    font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
    font-size: .84rem;
    word-break: break-all;
}
.detail-table-pc td a {
    color: var(--color-primary, #2f7d4f);
    text-decoration: none;
}
.detail-table-pc td a:hover { text-decoration: underline; }

/* ---------- GHS 安全数据 ---------- */
.ghs-signal {
    display: inline-block;
    padding: .28rem .9rem;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .7rem;
}
.ghs-danger  { background: #fdeceb; color: #c0392b; border: 1px solid #f5c6c2; }
.ghs-warning { background: #fff6e5; color: #b7791f; border: 1px solid #f7d9a8; }

.ghs-codes {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .8rem;
}
.ghs-code-badge {
    display: inline-block;
    padding: .12rem .5rem;
    background: #f2f6f3;
    border: 1px solid #dee7e1;
    border-radius: 6px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: .76rem;
    color: #444;
}

.ghs-statements {
    margin: 0;
    padding-left: 1.2rem;
    font-size: .85rem;
    line-height: 1.7;
    color: var(--color-text-secondary, #666);
}
.ghs-statements li { margin-bottom: .28rem; }

/* ---------- 提示 ---------- */
.pc-hint {
    padding: 1rem 1.1rem;
    background: #f7faf8;
    border: 1px dashed var(--color-border, #e2eae4);
    border-radius: 10px;
    font-size: .86rem;
    color: var(--color-text-secondary, #666);
    line-height: 1.6;
}
.pc-hint a { color: var(--color-primary, #2f7d4f); }
.pc-error { background: #fdf3f2; border-color: #f5c6c2; color: #a93226; }

/* 详情徽章 */
.detail-src { margin-bottom: .9rem; }
/* ============================================================
 * P4 用户认证样式（导航栏状态 / 登录注册弹窗）
 * ============================================================ */

/* ---------- 导航栏用户区 ---------- */
.nav-user { margin-left: auto; }
.nav-user-inner {
    display: flex;
    align-items: center;
    gap: .9rem;
    font-size: .88rem;
}
.nav-username {
    color: var(--color-text, #1d2822);
    font-weight: 600;
    white-space: nowrap;
}
.nav-guest-tip {
    color: var(--color-text-secondary, #666);
    font-size: .82rem;
    white-space: nowrap;
}
.nav-user-link {
    color: var(--color-text-secondary, #666);
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s;
}
.nav-user-link:hover {
    color: var(--color-primary, #2f7d4f);
    text-decoration: none;
}
.nav-login-btn {
    color: var(--color-primary, #2f7d4f);
    font-weight: 700;
}
.role-badge {
    display: inline-block;
    padding: 0 .4rem;
    background: #eaf4ee;
    color: #215c3a;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
}

/* ---------- 用户菜单（下拉式） ----------
 * 结构：.user-menu > button.user-menu-trigger + .user-menu-panel
 * 视觉（以截图为准，第二轮修正）：
 *   触发键 = 白底 + 绿色描边圆角胶囊；图标/用户名/下三角均为品牌绿；
 *   「管理员」徽章为深蓝底白字；浮层为白底圆角卡片，
 *   3 项：后台管理 / 修改密码 / 退出登录。
 *   注：首版做成「绿底白字实心胶囊」，与截图不符，已改回描边浅底。
 * 交互：点击切换 .open；点击外部 / Esc 关闭（见 auth.js bindMenu）。
 */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .7rem .3rem .6rem;
    border: 2px solid var(--color-primary, #2f7d4f);
    border-radius: 999px;
    background: #fff;
    color: var(--color-primary, #2f7d4f);
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
    transition: background .18s, box-shadow .18s, border-color .18s;
}

.user-menu-trigger:hover,
.user-menu-trigger:focus-visible {
    background: var(--color-bg-soft, #eaf4ee);
    box-shadow: 0 2px 10px rgba(0, 153, 68, .18);
    outline: none;
}

.user-menu-trigger i.bi-person-circle {
    font-size: 1.24rem;
    line-height: 1;
}

.user-menu-name {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: .01em;
}

/* 管理员徽章：深蓝底 + 白字（与截图一致） */
.user-menu-badge {
    display: inline-block;
    padding: .12rem .55rem;
    border-radius: 999px;
    /* fix78c：原 #1d4ed8 宝蓝，与墨绿品牌色冲突，改为浅墨绿底 + 深墨绿字 */
    background: #dcebe2;
    color: #1f5636;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

.user-menu-caret {
    font-size: .7rem;
    line-height: 1;
    color: var(--color-primary, #2f7d4f);
    transition: transform .2s;
}

.user-menu.open .user-menu-caret {
    transform: rotate(180deg);
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    min-width: 11.5rem;
    padding: .4rem;
    background: #fff;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06);
    z-index: 1080;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.user-menu.open .user-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .7rem;
    border-radius: 8px;
    color: var(--color-text, #1d2822);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: background .14s, color .14s;
}

.user-menu-item:hover,
.user-menu-item:focus-visible {
    background: var(--color-bg-soft, #f3f7f4);
    color: var(--color-primary, #2f7d4f);
    text-decoration: none;
    outline: none;
}

.user-menu-item i {
    font-size: 1.02rem;
    width: 1.15rem;
    text-align: center;
    flex: 0 0 auto;
}

@media (max-width: 991px) {
    .nav-user { margin-left: 0; margin-top: .6rem; }
    .nav-user-inner { flex-wrap: wrap; }
}

/* ---------- 通用提示框 / 表单星号 / 空状态 ---------- */
.note-box {
    background: #eaf4ee;
    border: 1px dashed var(--color-primary, #2f7d4f);
    border-radius: 10px;
    padding: .85rem 1rem;
    font-size: .86rem;
    color: var(--color-primary-hover, #215c3a);
    line-height: 1.6;
}

.required-star {
    color: #dc3545;
    margin-left: 2px;
}

.empty-tip {
    text-align: center;
    color: var(--color-text-placeholder, #999);
    padding: 2.5rem 0;
}

/* 数据共享列表表格（源站 share-table 原样对齐） */
.share-table th {
    background: #f2f6f3;
    color: var(--color-text-secondary, #666);
    font-weight: 600;
    font-size: .85rem;
    white-space: nowrap;
}

.share-table td {
    font-size: .88rem;
    vertical-align: top;
}

/* ---------- 环评运行统计指标盒 ---------- */
.eia-stat-box {
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: 12px;
    padding: .9rem .6rem;
    text-align: center;
    background: #fff;
    height: 100%;
}

.eia-stat-value {
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--color-primary, #2f7d4f);
    line-height: 1.25;
    word-break: break-all;
}

.eia-stat-label {
    margin-top: .18rem;
    font-size: .74rem;
    color: var(--color-text-secondary, #666);
    white-space: nowrap;
}

/* ---------- 认证弹窗 ---------- */
.auth-msg {
    min-height: 1.4rem;
    font-size: .86rem;
    margin-bottom: .6rem;
    line-height: 1.5;
}
.auth-err { color: #c0392b; }
.auth-ok  { color: #0a6b36; }
.auth-hint {
    font-size: .8rem;
    color: var(--color-text-secondary, #666);
    margin: 0;
}

#authModal .modal-content {
    border-radius: var(--radius-card, 16px);
    border: none;
    box-shadow: var(--shadow-lg);
}
#authModal .modal-header {
    border-bottom: 1px solid var(--color-border, #e2eae4);
    padding: 1rem 1.4rem;
}
#authModal .modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary, #2f7d4f);
}
#authModal .modal-body { padding: 1.3rem 1.4rem; }
#authModal .form-label {
    font-size: .86rem;
    font-weight: 600;
    color: var(--color-text, #1d2822);
    margin-bottom: .3rem;
}
/* ============================================================
 * P5 子模块样式（资讯中心 / 文章详情 / 数据共享）
 * ============================================================ */

/* ---------- 页面标题区 ---------- */
.page-header {
    background: linear-gradient(135deg, var(--color-primary-light, #3f9b64) 0%, var(--color-primary, #2f7d4f) 100%);
    border-radius: var(--radius-card, 16px);
    padding: 1.6rem 2rem;
    margin-bottom: 1.5rem;
    color: #fff;
}
.page-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 .35rem;
    color: #fff;
}
.page-header p {
    margin: 0;
    font-size: .9rem;
    opacity: .92;
}

/* ---------- 分类标签 ---------- */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.2rem;
}
.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem 1.05rem;
    background: #fff;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: 999px;
    color: var(--color-text-secondary, #666);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.cat-tab:hover {
    border-color: var(--color-primary, #2f7d4f);
    color: var(--color-primary, #2f7d4f);
    text-decoration: none;
}
.cat-tab.active {
    background: var(--color-primary, #2f7d4f);
    border-color: var(--color-primary, #2f7d4f);
    color: #fff;
}
.cat-count {
    display: inline-block;
    min-width: 18px;
    padding: 0 .32rem;
    background: rgba(0, 0, 0, .08);
    border-radius: 999px;
    font-size: .72rem;
    text-align: center;
}
.cat-tab.active .cat-count { background: rgba(255, 255, 255, .25); }

/* ---------- 资讯列表 ---------- */
.news-list { display: flex; flex-direction: column; gap: .75rem; }

.news-item {
    display: flex;
    gap: 1.2rem;
    padding: 1.1rem 1.3rem;
    background: #fff;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: var(--radius-card, 16px);
    text-decoration: none;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.news-item:hover {
    border-color: var(--color-primary, #2f7d4f);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    text-decoration: none;
}
.news-item-main { flex: 1; min-width: 0; }
.news-item-cat {
    display: inline-block;
    padding: .08rem .5rem;
    background: #eaf4ee;
    color: #215c3a;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 700;
    margin-bottom: .4rem;
}
.news-item-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--color-text, #1d2822);
    line-height: 1.5;
    margin: 0 0 .4rem;
}
.news-item:hover .news-item-title { color: var(--color-primary, #2f7d4f); }
.news-item-summary {
    font-size: .86rem;
    color: var(--color-text-secondary, #666);
    line-height: 1.6;
    margin: 0 0 .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .78rem;
    color: var(--color-text-placeholder, #999);
}
.news-item-meta i { margin-right: .22rem; }
.news-item-thumb {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f7faf8;
}
.news-item-thumb img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 576px) {
    .news-item-thumb { display: none; }
}

/* ---------- 分页 ---------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.6rem;
}
.pager-btn {
    padding: .4rem 1rem;
    background: #fff;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: 8px;
    color: var(--color-text-secondary, #666);
    font-size: .86rem;
    text-decoration: none;
}
.pager-btn:hover {
    border-color: var(--color-primary, #2f7d4f);
    color: var(--color-primary, #2f7d4f);
    text-decoration: none;
}
.pager-info { font-size: .84rem; color: var(--color-text-secondary, #666); }

/* ---------- 文章详情 ---------- */
.crumb {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .84rem;
    color: var(--color-text-secondary, #666);
    margin-bottom: 1rem;
}
.crumb a { color: var(--color-text-secondary, #666); text-decoration: none; }
.crumb a:hover { color: var(--color-primary, #2f7d4f); }

.article-box {
    background: #fff;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: var(--radius-card, 16px);
    padding: 2rem 2.4rem;
}
.article-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text, #1d2822);
    line-height: 1.45;
    margin: 0 0 .9rem;
}
.article-meta {
    display: flex;
    gap: 1.1rem;
    flex-wrap: wrap;
    font-size: .8rem;
    color: var(--color-text-placeholder, #999);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border, #e2eae4);
    margin-bottom: 1.2rem;
}
.article-meta i { margin-right: .25rem; }
.article-summary {
    background: #f7faf8;
    border-left: 4px solid var(--color-primary, #2f7d4f);
    border-radius: 0 8px 8px 0;
    padding: .9rem 1.1rem;
    font-size: .9rem;
    color: var(--color-text-secondary, #666);
    line-height: 1.7;
    margin-bottom: 1.4rem;
}
.article-content {
    font-size: .94rem;
    line-height: 1.85;
    color: var(--color-text-regular, #333);
    word-break: break-word;
}
.article-content p { margin: 0 0 1rem; }
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: .6rem 0;
}
.article-content h2, .article-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text, #1d2822);
    margin: 1.6rem 0 .8rem;
}
.article-content a { color: var(--color-primary, #2f7d4f); }
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: .86rem;
}
.article-content th, .article-content td {
    border: 1px solid var(--color-border, #e2eae4);
    padding: .5rem .7rem;
}
.article-content th { background: #f7faf8; font-weight: 600; }
.article-content blockquote {
    border-left: 4px solid var(--color-primary, #2f7d4f);
    background: #f7faf8;
    padding: .7rem 1rem;
    margin: 1rem 0;
    color: var(--color-text-secondary, #666);
}

@media (max-width: 576px) {
    .article-box { padding: 1.3rem 1.1rem; }
    .article-title { font-size: 1.2rem; }
}

/* ---------- 相关资讯 ---------- */
.rel-box {
    margin-top: 1.4rem;
    background: #fff;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: var(--radius-card, 16px);
    padding: 1.2rem 1.5rem;
}
.rel-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-primary, #2f7d4f);
    margin: 0 0 .7rem;
}
.rel-list { list-style: none; padding: 0; margin: 0; }
.rel-list li {
    padding: .45rem 0;
    border-bottom: 1px dashed var(--color-border, #e2eae4);
    font-size: .88rem;
}
.rel-list li:last-child { border-bottom: none; }
.rel-list a { color: var(--color-text-regular, #333); text-decoration: none; }
.rel-list a:hover { color: var(--color-primary, #2f7d4f); }

/* ---------- 数据共享 ---------- */
.card-panel {
    background: #fff;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: var(--radius-card, 16px);
    padding: 1.5rem 1.6rem;
}
.panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text, #1d2822);
    margin: 0 0 1.1rem;
    padding-left: .6rem;
    border-left: 4px solid var(--color-primary, #2f7d4f);
}
.req { color: #f56c6c; }

.share-list { display: flex; flex-direction: column; gap: .6rem; }
.share-item {
    padding: .9rem 1rem;
    background: #fbfcfb;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: 12px;
}
.share-item-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-text, #1d2822);
    line-height: 1.5;
    word-break: break-all;
}
.share-item-en {
    font-size: .82rem;
    color: var(--color-text-secondary, #666);
    margin-top: .2rem;
    word-break: break-all;
}
.share-item-meta {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    margin-top: .45rem;
}
.meta-tag {
    display: inline-block;
    padding: .1rem .5rem;
    background: #eaf4ee;
    color: #215c3a;
    border-radius: 6px;
    font-size: .74rem;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}
.meta-date {
    background: #f2f6f3;
    color: #666;
    font-family: inherit;
}
.share-item-purpose {
    font-size: .82rem;
    color: var(--color-text-secondary, #666);
    margin-top: .4rem;
    line-height: 1.6;
}
/* ============================================================
 * 后台管理样式
 * ============================================================ */

.admin-body { background: #f7faf8; }

.admin-wrap {
    display: flex;
    gap: 1.2rem;
    max-width: 1560px;
    margin: 0 auto;
    padding: 1.2rem 1.4rem 3rem;
    align-items: flex-start;
}

/* ---------- 侧边栏 ---------- */
.admin-side {
    width: 190px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: 14px;
    padding: .6rem;
    position: sticky;
    top: 76px;
}
.admin-nav { list-style: none; padding: 0; margin: 0; }
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .62rem .8rem;
    border-radius: 10px;
    color: var(--color-text-secondary, #666);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
    margin-bottom: .15rem;
}
.admin-nav-item:hover {
    background: #f0f7f3;
    color: var(--color-primary, #2f7d4f);
    text-decoration: none;
}
.admin-nav-item.active {
    background: var(--color-primary, #2f7d4f);
    color: #fff;
}
.admin-nav-item i { font-size: 1rem; }
.admin-badge {
    margin-left: auto;
    min-width: 18px;
    padding: 0 .3rem;
    background: #f56c6c;
    color: #fff;
    border-radius: 999px;
    font-size: .7rem;
    text-align: center;
}

/* ---------- 主区 ---------- */
.admin-main { flex: 1; min-width: 0; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text, #1d2822);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
}

/* ---------- 统计卡片 ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: .8rem;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: 14px;
    padding: 1rem 1.15rem;
}
.stat-label {
    font-size: .8rem;
    color: var(--color-text-secondary, #666);
    margin-bottom: .35rem;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text, #1d2822);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.stat-warn { color: #e6a23c; }

/* ---------- 趋势图 ---------- */
.trend-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: .4rem;
    height: 190px;
    padding: .5rem 0;
}
.trend-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}
.trend-count {
    font-size: .74rem;
    color: var(--color-text-secondary, #666);
    margin-bottom: .2rem;
}
.trend-bar {
    width: 60%;
    max-width: 46px;
    background: linear-gradient(180deg, #3f9b64, #2f7d4f);
    border-radius: 6px 6px 0 0;
    transition: height .3s;
}
.trend-date {
    font-size: .72rem;
    color: var(--color-text-placeholder, #999);
    margin-top: .35rem;
}

/* ---------- 热门词 / 各库 ---------- */
.hot-list, .catalog-list { display: flex; flex-direction: column; gap: .35rem; }
.hot-item, .catalog-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .42rem .6rem;
    border-radius: 8px;
    font-size: .86rem;
}
.hot-item:nth-child(odd), .catalog-row:nth-child(odd) { background: #fbfcfb; }
.hot-rank {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: #eaf4ee;
    color: #215c3a;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hot-word { flex: 1; word-break: break-all; }
.hot-count { color: var(--color-primary, #2f7d4f); font-weight: 700; }
.catalog-row span { flex: 1; color: var(--color-text-secondary, #666); }
.catalog-row strong { color: var(--color-primary, #2f7d4f); font-variant-numeric: tabular-nums; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .86rem;
}
.admin-table th {
    background: #f7faf8;
    color: var(--color-text-secondary, #666);
    font-weight: 600;
    padding: .6rem .7rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border, #e2eae4);
}
.admin-table td {
    padding: .58rem .7rem;
    border-bottom: 1px solid #f2f6f3;
    vertical-align: middle;
}
.admin-table tr:hover td { background: #fbfcfb; }
.td-title { max-width: 380px; word-break: break-all; line-height: 1.5; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ---------- 操作按钮 ---------- */
.ops { white-space: nowrap; }
.btn-op {
    display: inline-block;
    padding: .18rem .5rem;
    margin-right: .28rem;
    border: 1px solid var(--color-border, #e2eae4);
    background: #fff;
    border-radius: 6px;
    font-size: .78rem;
    color: var(--color-text-secondary, #666);
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}
.btn-op:hover {
    border-color: var(--color-primary, #2f7d4f);
    color: var(--color-primary, #2f7d4f);
    text-decoration: none;
}
.btn-op-ok   { border-color: #b7e4cc; color: #0a6b36; background: #eaf4ee; }
.btn-op-warn { border-color: #f7d9a8; color: #8a5a12; background: #fff6e5; }
.btn-op-err  { border-color: #f5c6c2; color: #c0392b; background: #fdeceb; }

/* ---------- 徽章 ---------- */
.badge-st {
    display: inline-block;
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
}
.badge-st.ok   { background: #eaf4ee; color: #215c3a; }
.badge-st.warn { background: #fff6e5; color: #b7791f; }
.badge-st.err  { background: #fdeceb; color: #c0392b; }
.badge-admin {
    display: inline-block;
    padding: .1rem .5rem;
    background: #eaf4ee;
    color: #215c3a;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}
.badge-cat {
    display: inline-block;
    padding: .1rem .45rem;
    background: #f2f6f3;
    color: #555;
    border-radius: 6px;
    font-size: .74rem;
    white-space: nowrap;
}

/* ---------- 工具栏 ---------- */
.toolbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .9rem;
}
.stat-inline {
    font-size: .84rem;
    color: var(--color-text-secondary, #666);
    margin-bottom: .7rem;
}

/* ---------- Toast ---------- */
.admin-toast {
    position: fixed;
    top: 78px;
    left: 50%;
    transform: translate(-50%, -14px);
    padding: .62rem 1.3rem;
    background: #333;
    color: #fff;
    border-radius: 10px;
    font-size: .88rem;
    opacity: 0;
    transition: all .3s;
    z-index: 20000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.admin-toast.show { opacity: 1; transform: translate(-50%, 0); }
.admin-toast-ok   { background: #0a6b36; }
.admin-toast-err  { background: #c0392b; }
.admin-toast-warn { background: #b7791f; }

/* ---------- 响应式 ---------- */
@media (max-width: 991px) {
    .admin-wrap { flex-direction: column; padding: 1rem; }
    .admin-side { width: 100%; position: static; }
    .admin-nav { display: flex; flex-wrap: wrap; gap: .3rem; }
    .admin-nav-item { padding: .45rem .7rem; font-size: .84rem; }
    .admin-badge { margin-left: .2rem; }
}
/* ===== PubChem 未命中态样式 ===== */
.pc-src-miss { background: #fff4e5; color: #b26a00; }
.pc-miss { background: #fffaf2; border-color: #f0d9b5; }
.pc-miss .pc-tried {
    margin-top: .55rem;
    font-size: .8rem;
    color: var(--color-text-secondary, #666);
    line-height: 1.9;
}
.pc-miss .pc-tried code {
    display: inline-block;
    margin: 0 .2rem .2rem 0;
    padding: .05rem .4rem;
    background: #fff;
    border: 1px solid #eadfce;
    border-radius: 4px;
    font-size: .76rem;
    color: #8a5a00;
    word-break: break-all;
}
.pc-miss .pc-tried-note {
    margin-top: .5rem;
    font-size: .78rem;
    color: #998b78;
}

/* ============================================================
 * 后台登录门禁（未登录 / 非管理员）
 * ============================================================ */
.admin-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 150px);
    padding: 2rem 1rem 4rem;
}
.admin-gate-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: var(--radius-card, 16px);
    padding: 2rem 1.9rem 1.6rem;
    box-shadow: 0 10px 34px rgba(20, 40, 30, .08);
}
.admin-gate-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-primary, #2f7d4f);
}
.admin-gate-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text, #1d2822);
    margin: 1.15rem 0 .35rem;
}
.admin-gate-desc {
    font-size: .84rem;
    color: var(--color-text-secondary, #666);
    margin-bottom: 1.2rem;
    line-height: 1.6;
}
.admin-gate-back {
    display: inline-block;
    margin-top: 1rem;
    font-size: .84rem;
    color: var(--color-text-secondary, #666);
    text-decoration: none;
}
.admin-gate-back:hover {
    color: var(--color-primary, #2f7d4f);
    text-decoration: none;
}
@media (max-width: 575.98px) {
    .admin-gate { min-height: auto; padding: 1.2rem .8rem 3rem; }
    .admin-gate-card { padding: 1.5rem 1.2rem 1.2rem; }
}

/* ============================================================
 * 密码显示/隐藏（眼睛图标）
 * 用于：前台认证弹窗（登录/注册/改密）与后台门禁登录卡片
 * 背景：password 框内用户看不见自己输入了什么，! 易变全角、@ 易漏输，
 *       只能靠"显示密码"自证；同时避免用降低密码强度的方式绕开问题。
 * ============================================================ */
.pw-wrap {
    position: relative;
}
.pw-wrap > .form-control {
    padding-right: 2.4rem;
}
.pw-toggle {
    position: absolute;
    right: .6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: #8a9a91;
    cursor: pointer;
    padding: .2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border-radius: 4px;
    /* 保证在窄屏上不挤出输入框 */
    max-width: 2rem;
}
.pw-toggle:hover,
.pw-toggle:focus-visible {
    color: var(--color-primary, #2f7d4f);
}
.pw-toggle:focus-visible {
    outline: 2px solid var(--color-primary, #2f7d4f);
    outline-offset: 1px;
}
@media (max-width: 575.98px) {
    .pw-wrap > .form-control { padding-right: 2.2rem; }
    .pw-toggle { right: .45rem; }
}

/* ============================================================
 * 环评页「门禁卡片」：页面级居中（原先复用结果区空态样式 → 贴左留白不对称）
 * 只作用于 .eia-gate-card，不影响首页搜索结果区的 .empty-state-box
 * ============================================================ */
.eia-gate-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 55vh;
    padding: 3rem 1rem;
}
.eia-gate-card {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    padding: 2.6rem 2rem 2.2rem;
    text-align: center;
    border-radius: var(--radius-card, 16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
}
.eia-gate-card .empty-icon-large {
    font-size: 2.8rem;
    line-height: 1;
    color: var(--color-primary, #2f7d4f);
    margin-bottom: 1.1rem;
}
.eia-gate-card .empty-title-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text, #1d2822);
    margin: 0 0 1rem;
}
.eia-gate-card .empty-desc-text {
    font-size: .92rem;
    color: var(--color-text-secondary, #666);
    line-height: 1.9;
    margin: 0 0 1.7rem;
}
.eia-gate-actions {
    display: flex;
    justify-content: center;
    gap: .8rem;
    flex-wrap: wrap;
}
.eia-gate-actions .btn {
    min-width: 200px;
}
.eia-gate-hint {
    margin: 1rem 0 0;
    font-size: .82rem;
    color: var(--color-text-secondary, #999);
}
@media (max-width: 575.98px) {
    .eia-gate-wrap {
        min-height: auto;
        padding: 1.5rem .8rem;
    }
    .eia-gate-card {
        padding: 1.8rem 1.2rem 1.6rem;
    }
    .eia-gate-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

/* ============================================================
 * Quill 输出内容的渲染兼容（前台正文 / 后台预览）
 *
 * 背景：Quill 2 的 HTML 依赖自身 CSS：
 *   · 无序列表输出为 <ol><li data-list="bullet">（靠 CSS 渲染成圆点）
 *   · 缩进用 ql-indent-N 类
 *   · 列表项内部含空的 <span class="ql-ui" contenteditable="false">
 * 前台没有 quill.snow.css，若不补这几条，无序列表会显示成有序列表、列表项前出现空白块。
 * 这里只做「渲染兜底」，不改动存储的 HTML，保证与编辑器往返一致。
 * ============================================================ */
.article-content li[data-list="bullet"] {
    list-style-type: disc;
}
.article-content li[data-list="ordered"] {
    list-style-type: decimal;
}
.article-content li[data-list="checked"],
.article-content li[data-list="unchecked"] {
    list-style-type: none;
}
.article-content li > span.ql-ui {
    display: none;
}
.article-content ol,
.article-content ul {
    padding-left: 1.6rem;
    margin: 0 0 1rem;
}
.article-content li {
    margin: .25rem 0;
    line-height: 1.85;
}
.article-content .ql-indent-1 { margin-left: 1.6rem; }
.article-content .ql-indent-2 { margin-left: 3.2rem; }
.article-content .ql-indent-3 { margin-left: 4.8rem; }
.article-content .ql-align-center { text-align: center; }
.article-content .ql-align-right { text-align: right; }
.article-content .ql-align-justify { text-align: justify; }
.article-content pre.ql-syntax,
.article-content .ql-code-block-container {
    background: #f6f9f7;
    border-radius: 8px;
    padding: .9rem 1rem;
    overflow-x: auto;
    font-size: .86rem;
    line-height: 1.6;
}

/* ===== 环评提取：iframe 内嵌 ===== */
.eia-frame-wrap {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
.eia-frame {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 640px;
    border: 0;
    background: #f7faf8;
}
@media (max-width: 767px) {
    .eia-frame { min-height: 78vh; }
}

/* 密码重置结果框（一次性展示随机密码，关闭后不可再查） */
.pwd-box {
    display: flex; align-items: center; gap: .5rem;
    background: #f6f9f7; border: 1px dashed #ccd8d1; border-radius: 6px;
    padding: .6rem .75rem;
}
.pwd-box code { font-size: 1.05rem; letter-spacing: 1px; flex: 1 1 auto; word-break: break-all; }

/* 后台「使用说明」排版 */
.admin-help-h { font-size: 1rem; font-weight: 700; margin: 1.2rem 0 .6rem; padding-left: .5rem; border-left: 3px solid var(--color-primary, #2f7d4f); }
.admin-help-h:first-child { margin-top: 0; }
.admin-help { margin: 0 0 1rem; }
.admin-help dt { font-weight: 700; margin-top: .8rem; color: var(--color-text-primary, #222); }
.admin-help dd { margin: .25rem 0 0 0; padding-left: .8rem; color: var(--color-text-regular, #555); line-height: 1.75; font-size: .92rem; }
.admin-help code { background: #f4f7f5; padding: .05rem .3rem; border-radius: 3px; font-size: .88rem; }

/* ====== Excel 结果表格内的模糊联想（fix50） ======
 * 卡片里 .bf-item 是 flex + .bf-name 强制 nowrap，放进表格单元格会：
 *   ① 把单元格撑宽 → 整列变宽，挤掉 CAS 列（表现为 CAS 断行）
 *   ② 溢出到相邻列下面（表现为联想内容串到「原始输入」列下方）
 * 这里把表格内的联想改成「整行流式 + 允许换行」，与 8901 表格一致。
 */
.excel-fuzzy-cell { max-width: 420px; }
.excel-fuzzy-cell details.batch-fuzzy { margin-top: 0; }
.excel-fuzzy-cell details.batch-fuzzy > summary {
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
}
.excel-fuzzy-cell .batch-fuzzy-body { padding: 0.4rem 0 0.1rem 1.1rem; }
.excel-fuzzy-cell .batch-fuzzy .bf-item {
    display: block;              /* 不用 flex：flex 子项会撑宽单元格 */
    line-height: 1.65;
    margin-bottom: 0.25rem;
    word-break: break-all;       /* 长中文名允许在单元格内换行 */
}
.excel-fuzzy-cell .batch-fuzzy .bf-cas {
    margin-right: 0.4rem;
}
.excel-fuzzy-cell .batch-fuzzy .bf-name {
    white-space: normal;         /* 覆盖卡片的 nowrap：单元格里必须能换行 */
    overflow: visible;
    text-overflow: clip;
}
.excel-fuzzy-cell .batch-fuzzy .bf-detail { margin-left: 0.4rem; }

/* CAS 列永不断行（64-17-5 不能在连字符处断成两行） */
.excel-row-table td .cas-value,
.excel-row-table .result-db-badge { white-space: nowrap; }

/* 卡片标题行的「匹配方式」小标签（fix51：Excel 改回卡片后保留判定依据） */
.batch-group-head .batch-match-tag {
    display: inline-block;
    margin-left: 0.1rem;
    padding: 0.12rem 0.5rem;
    border-radius: var(--radius-sm, 4px);
    background: var(--color-bg-soft, #f4f7f5);
    color: var(--color-text-secondary, #666);
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
}

/* 卡片头三元素布局（fix51）：词 | 结论徽章 | 匹配方式
 * 原 .batch-group-head 是 space-between 两段式，加第三个元素后会变成「左-中-右」散开，
 * 这里让「词」占满剩余宽度，后两个徽章/标签靠右聚拢。 */
.batch-group-head > .batch-group-term { flex: 1 1 auto; min-width: 0; }
.batch-group-head > .batch-verdict-badge { flex: 0 0 auto; }
.batch-group-head > .batch-match-tag { flex: 0 0 auto; }

/* ====== 后台表单控件宽度（fix52） ======
 * 后台各页面统一为「卡片铺满」后，全宽 form-control 在宽屏上会被拉得过长。
 * 只对「本身就不需要长」的控件加上限，文本框/文本域保持全宽（录入长内容需要）。
 */
.admin-panel .card-panel input[type="number"],
.admin-panel .card-panel input[type="text"].form-control-narrow,
.admin-panel .card-panel input[type="password"].form-control-narrow {
    max-width: 220px;
}
/* 数据表格里的输入框不受上面影响 */
.admin-panel .card-panel .table input[type="number"] { max-width: none; }

/* 单条结果卡片头（fix61）：名称左、结论徽章固定右上角。
 * 原 flex-wrap:wrap 下，名字过长会占满整行并把徽章挤到下一行最左（截图里的错位）；
 * 改 nowrap + 名称 flex:1 之后，徽章始终留在第一行右侧、名称在剩余宽度内换行。
 * align-items:flex-start 让多行名称时徽章贴顶，而不是垂直居中。 */
.result-card-head {
    flex-wrap: nowrap;
    align-items: flex-start;
}
.result-card-head > .result-card-name { flex: 1 1 auto; min-width: 0; }
.result-card-head > .result-card-badges { flex: 0 0 auto; margin-left: auto; }

/* ====== 单条结果多库合并徽章（fix62） ======
 * 同一 CAS 在多个库都有记录时合并为一张卡，每个库一枚徽章、竖排一行。
 * 配色沿用名录选择器的 .db-*（危化红 / IECIC 粉 / GB9685 青），IECSC 用绿色。
 */
.result-card-badges {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;    /* 多库时逐行排列 */
    align-items: flex-end;     /* 右对齐 */
    gap: .35rem;
}
/* 徽章底色/描边/文字色按库区分（覆盖 .batch-verdict-badge.ok 的统一样式） */
.result-card-badges .batch-verdict-badge { border: 1px solid; }
.result-card-badges .db-iecsc   { background: #e6f4ea; color: #215c3a; border-color: #215c3a; }
.result-card-badges .db-weixian { background: #fdeceb; color: #c0392b; border-color: rgba(220,53,69,.55); }
.result-card-badges .db-iecic   { background: #fdf0f5; color: #b3446c; border-color: rgba(214,51,132,.55); }
.result-card-badges .db-gb9685  { background: #e6f7f6; color: #0d7a70; border-color: rgba(13,148,136,.55); }

/* ====== 详情弹窗内的库切换（fix63） ======
 * 合并卡片点开后，同一 CAS 在多个库的记录可在这里切换查看。
 * 按钮配色沿用 .db-*，选中态实心、未选中态描边，避免误以为都是"已列入"。
 */
.db-switch-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .9rem;
    padding-bottom: .75rem;
    border-bottom: 1px dashed var(--color-border, #e2eae4);
}
.db-switch-btn {
    padding: .28rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--color-border, #d3ddd7);
    background: #fff;
    color: var(--color-text-secondary, #666);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
}
.db-switch-btn:hover { border-color: var(--color-primary, #215c3a); color: var(--color-primary, #215c3a); }
/* 选中态：按库上色（实心） */
.db-switch-btn.active.db-iecsc   { background: #e6f4ea; color: #215c3a; border-color: #215c3a; }
.db-switch-btn.active.db-weixian { background: #fdeceb; color: #c0392b; border-color: rgba(220,53,69,.55); }
.db-switch-btn.active.db-iecic   { background: #fdf0f5; color: #b3446c; border-color: rgba(214,51,132,.55); }
.db-switch-btn.active.db-gb9685  { background: #e6f7f6; color: #0d7a70; border-color: rgba(13,148,136,.55); }

/* ====== 单条查询·搜索历史下拉（fix68） ======
 * 复用 #suggestDropdown 容器：空输入框聚焦时展示最近 10 条查询词。
 * 视觉上刻意比联想项更「轻」——历史是辅助，不该压过真正的检索结果。
 */
.suggest-his-head {
    position: sticky;          /* 下拉 max-height:40vh 会滚动，表头需钉住 */
    top: 0;
    z-index: 1;
    background: var(--color-bg-card, #fff);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .45rem .9rem .35rem;
    color: var(--color-text-placeholder, #999);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    border-bottom: 1px solid var(--color-bg-page);
}
.suggest-his-clear {
    border: 0;
    background: none;
    padding: 0;
    color: var(--color-text-secondary, #888);
    font-size: .78rem;
    cursor: pointer;
}
.suggest-his-clear:hover { color: var(--color-primary, #215c3a); text-decoration: underline; }

.suggest-item.suggest-his { gap: .55rem; }
.suggest-his-icon { color: var(--color-text-placeholder, #aaa); font-size: .9rem; flex: 0 0 auto; }
.suggest-his-q {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--color-text, #333);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 删除按钮：默认淡出，悬停该行才显现，避免一堆 × 干扰阅读 */
.suggest-his-del {
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
    line-height: 1;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-placeholder, #bbb);
    font-size: 1.05rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s, background .15s, color .15s;
}
.suggest-item.suggest-his:hover .suggest-his-del { opacity: 1; }
.suggest-his-del:hover { background: var(--color-bg-soft, #f2f6f3); color: #c0392b; }

/* 最后一行去掉分隔线，避免和圆角边框叠成双线 */
.suggest-item.suggest-his:last-child { border-bottom: 0; }

/* ====== 批量/Excel 卡片：整卡可点 + 多库徽章（fix71） ======
 * 与单条查询的卡片行为对齐：
 *   · 点卡片任意位置开详情弹窗（「查看详情」保留为视觉提示）
 *   · 同一物质在多个库时，右侧竖排多枚徽章、逐库配色
 */
.batch-group-card.batch-card-clickable {
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.batch-group-card.batch-card-clickable:hover {
    border-color: var(--color-primary, #215c3a);
    box-shadow: var(--shadow-md, 0 4px 14px rgba(0, 0, 0, .08));
}
.batch-group-card.batch-card-clickable:active { transform: translateY(1px); }

/* 卡片头三元素：词 | 徽章组 | 匹配方式
 * 原 .batch-group-head 是 space-between 两段式，加第三个元素会散开；
 * 让「词」吃掉剩余宽度，徽章组与标签靠右聚拢。 */
.batch-group-head > .batch-group-term   { flex: 1 1 auto; min-width: 0; }
.batch-group-head > .batch-group-badges { flex: 0 0 auto; margin-left: auto; }
.batch-group-head > .batch-match-tag    { flex: 0 0 auto; }

/* 多库徽章竖排（与单条 .result-card-badges 同款） */
.batch-group-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .35rem;
}
/* 逐库配色：覆盖 .batch-verdict-badge.ok 的统一样式 */
.batch-group-badges .batch-verdict-badge { border: 1px solid; }
.batch-group-badges .db-iecsc   { background: #e6f4ea; color: #215c3a; border-color: #215c3a; }
.batch-group-badges .db-weixian { background: #fdeceb; color: #c0392b; border-color: rgba(220,53,69,.55); }
.batch-group-badges .db-iecic   { background: #fdf0f5; color: #b3446c; border-color: rgba(214,51,132,.55); }
.batch-group-badges .db-gb9685  { background: #e6f7f6; color: #0d7a70; border-color: rgba(13,148,136,.55); }
/* 未列入徽章不需要描边（保持原红底样式） */
.batch-group-badges .batch-verdict-badge.no { border: 0; }

/* 模糊联想在可点卡片内：标题与项都加 pointer 光标，暗示「这里点了不跳详情」 */
.batch-group-card .batch-fuzzy > summary { cursor: pointer; }

/* ====== 查询结果分页（fix72） ======
 * 视觉沿用后台 .pager 的风格（白底描边圆角、hover 变绿），
 * 但布局改为「左侧区间信息 + 右侧页码」的横向条，放在结果列表下方。
 */
.pg-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--color-border, #e2eae4);
}
.pg-info {
    color: var(--color-text-secondary, #666);
    font-size: .88rem;
}
.pg-info strong {
    color: var(--color-text, #222);
    font-weight: 700;
}

.pg-nav {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}
.pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    height: 2.1rem;
    padding: 0 .6rem;
    background: #fff;
    border: 1px solid var(--color-border, #e2eae4);
    border-radius: 8px;
    color: var(--color-text-secondary, #666);
    font-size: .88rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: all .16s ease;
}
.pg-btn:hover:not(:disabled):not(.pg-current) {
    border-color: var(--color-primary, #215c3a);
    color: var(--color-primary, #215c3a);
}
.pg-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}
/* 当前页：实心绿，不可点 */
.pg-current {
    background: var(--color-primary, #215c3a);
    border-color: var(--color-primary, #215c3a);
    color: #fff !important;
    cursor: default;
}
.pg-ellipsis {
    padding: 0 .2rem;
    color: var(--color-text-placeholder, #aaa);
    font-size: .9rem;
    user-select: none;
}

/* 窄屏：区间信息独占一行，页码居中 */
@media (max-width: 575.98px) {
    .pg-bar { justify-content: center; }
    .pg-info { width: 100%; text-align: center; }
}
