/* VetNeuro 系统样式 - 响应式适配电脑/平板/手机 */
:root {
    --primary: #1a237e;
    --primary-light: #3949ab;
    --primary-bg: #e8eaf6;
    --accent: #00bcd4;
    --success: #2e7d32;
    --warning: #f57c00;
    --danger: #c62828;
    --text: #212121;
    --text-light: #616161;
    --border: #e0e0e0;
    --bg: #f5f6fa;
    --card-bg: #ffffff;
}

* { box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "SimHei", "PingFang SC", sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    max-width: 1400px;
    margin: 0 auto;
}
.navbar-brand {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar-brand .logo-icon {
    width: 32px; height: 32px;
    background: var(--accent);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    /* UI-V24-01 修复：主导航按钮回归「用户信息左侧」。
       背景：BUG-V19-23 把主导航链接从 .navbar-user 内部移进 #navMenu
       （.navbar-inner 的直接子元素），以便 ☰ 按钮能 toggle 到它们。
       但 .navbar-inner 是 justify-content: space-between，多出一个独立子元素后，
       这组按钮被挤到了导航栏「中间」，与用户习惯的位置不符。
       做法：用 margin-left:auto 把整组按钮吸收掉全部剩余空间、贴到右侧用户区之前，
       视觉上等价于原来的位置（紧邻「系统管理员」左侧），而 DOM 结构不动，
       ☰ 的展开逻辑完全保留。
       移动端（≤768px）该元素是 display:none / width:100%，auto 外边距自动失效，行为不变。

       UI-V24-02 修复：应「两个按钮挨得太近、字体有遮挡，且右侧几乎贴上用户名」的反馈而调：
       - gap 4px → 10px：拉开「病例管理 / 系统设置」两个按钮的间距，消除字体遮挡；
       - 新增 margin-right:14px：整组左移，与右侧「系统管理员」之间留出呼吸空间。
       （margin-left:auto 必须保留，见上：它是「按钮回归用户区左侧」的定位机制。） */
    margin-left: auto;
    margin-right: 14px;
}
.navbar-menu a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}
.navbar-menu a:hover, .navbar-menu a.active {
    background: rgba(255,255,255,0.15);
    color: white;
}
.navbar-user {
    color: white;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-btn {
    color: white !important;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 14px;
    background: rgba(255,255,255,0.1);
    transition: background 0.2s;
    display: inline-block;
}
.nav-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white !important;
    text-decoration: none;
}
.nav-btn.active {
    background: rgba(255,255,255,0.25);
    font-weight: 600;
}
.navbar-user .role-badge {
    background: var(--accent);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* 主内容 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 卡片 */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-header {
    background: var(--primary-bg);
    padding: 12px 20px;
    font-weight: bold;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}
.card-body { padding: 20px; }

/* AI 接入配置卡片：整卡默认折叠，仅显示标题一行（点击标题展开/收起） */
details.ai-card {
    display: block;
}
details.ai-card > summary.card-header {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
details.ai-card > summary.card-header::-webkit-details-marker { display: none; }
details.ai-card > summary.card-header::marker { content: ''; }
/* 收起时去掉标题下边框，避免悬空线条 */
details.ai-card:not([open]) > summary.card-header { border-bottom: none; }
/* 自定义折叠箭头（默认指向右，展开时向下旋转） */
.ai-caret {
    display: inline-block;
    width: 0; height: 0;
    margin-left: 8px;
    border-left: 5px solid var(--text-light);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform .2s ease;
    vertical-align: middle;
}
details.ai-card[open] .ai-caret { transform: rotate(90deg); }

/* 通用可折叠卡片：设置页所有配置卡片统一为「默认收起、点标题才展开」，
   行为与上面的 AI 接入配置保持一致（原来只有 AI 卡是折叠的，其余全是常展开）。 */
details.card { display: block; }
details.card > summary.card-header {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
details.card > summary.card-header::-webkit-details-marker { display: none; }
details.card > summary.card-header::marker { content: ''; }
/* 收起时去掉标题下边框，避免悬空线条 */
details.card:not([open]) > summary.card-header { border-bottom: none; }
details.card > summary.card-header:hover { filter: brightness(0.97); }
/* 自定义折叠箭头（指向右，展开时旋转向下） */
.card-caret {
    display: inline-block;
    width: 0; height: 0;
    margin-left: 8px;
    border-left: 5px solid var(--text-light);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform .2s ease;
    vertical-align: middle;
}
details.card[open] .card-caret { transform: rotate(90deg); }

/* 通用弹窗（备份位置选择 / 云端备份告知） */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-box {
    background: var(--card-bg);
    border-radius: 10px;
    max-width: 580px;
    width: 100%;
    max-height: 88vh;
    overflow: auto;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
}
.modal-box > h3 {
    margin: 0;
    padding: 14px 20px;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}
.modal-box .modal-body { padding: 18px 20px; font-size: 14px; line-height: 1.75; }
.modal-box .modal-body p { margin: 0 0 8px 0; }
.modal-box .modal-foot {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-weight: 500;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #388e3c; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #ef6c00; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b71c1c; }
.btn-info { background: var(--accent); color: white; }
.btn-info:hover { background: #0097a7; }
.btn-secondary { background: #757575; color: white; }
.btn-secondary:hover { background: #616161; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    /* 统一尺寸：固定高度 + border-box，消除"描边按钮比实心按钮高 2px"的高度差 */
    height: 30px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1;
}
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* 表单型按钮（如"删除"）与链接按钮保持同一行高，避免基线错位 */
.btn-group > form { display: flex; margin: 0; }
/* 表格操作列：四个按钮等宽，视觉整齐 */
.table .btn-group .btn { min-width: 60px; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text);
    font-size: 14px;
}
.form-label .required { color: var(--danger); }
.form-control, .form-select, textarea, input[type="text"], input[type="number"], input[type="password"], input[type="date"], select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s;
}
.form-control:focus, .form-select:focus, textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,35,126,0.1);
}
textarea { resize: vertical; min-height: 60px; }
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.form-check input { width: auto; }

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th, .table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.table th {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}
.table tr:hover { background: #f8f9ff; }
.table .abnormal { color: var(--danger); font-weight: 600; }
.table-wrapper { overflow-x: auto; }

/* 标签页 */
.tabs {
    display: flex;
    /* V25-UI-04 修复：原为 border-bottom: 2px solid var(--border)。
       改为等值的内阴影线条，原因见 .tab 的 margin-bottom 说明：
       容器变成滚动容器后，其 border 区不在裁剪范围内，而 .tab 需要把
       3px 下划线压到容器底边上，会越过 padding box 2px。用内阴影画这条
       2px 线既保留了「底边分隔线」的视觉，又不再产生垂直溢出，
       且容器总高（43px）与原实现完全一致，下游布局零位移。 */
    box-shadow: inset 0 -2px 0 var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
    /* V25-UI-04 修复：只设 overflow-x 会让 overflow-y 被计算为 auto
       （CSS 规范：一个轴非 visible 时，另一轴的 visible 计算为 auto），
       于是 .tab 的 2px 垂直溢出在 Windows 上渲染成一条 15px 宽的垂直
       滚动条。见 _diag_tabs/ 诊断：clientH=41 / scrollH=43 / vScrollbarPx=15。 */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
.tab {
    padding: 10px 18px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 14px;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    /* V25-UI-04 修复：原为 margin-bottom: -2px（让下划线压住容器 2px 底边）。
       负外边距使 .tab 的边框盒比容器 content box 低出 2px，在滚动容器里
       既裁掉了自己 2px 的下划线，又制造出垂直滚动条。
       现改为 0，配合上面 .tabs 的内阴影线条，下划线完整显示且不再溢出。 */
    margin-bottom: 0;
    white-space: nowrap;
    transition: all 0.2s;
}
.tab:hover { color: var(--primary); }
.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
/* UI-V24-03：已填写步骤标记。neuro_exam.html 的 refreshFilledMarks() 在"用户真的有填过"
   的步骤标签上加 .has-data，这里只负责画一个小圆点。
   配色说明：标签位于浅色页面上，直接用「半透明白」会几乎看不见，
   故未选中态用主色 35% 透明度（低调但可见），当前激活步骤用实心主色（醒目，
   与 .tab.active 的文字/下划线同色，视觉统一）。 */
.tab.has-data::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 6px;
    border-radius: 50%;
    background: rgba(26, 35, 126, 0.35);
    vertical-align: middle;
}
.tab.active.has-data::after {
    background: var(--primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 提示框 */
.alert {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #e8f5e9; color: var(--success); border: 1px solid #a5d6a7; }
.alert-danger { background: #ffebee; color: var(--danger); border: 1px solid #ef9a9a; }
.alert-warning { background: #fff3e0; color: var(--warning); border: 1px solid #ffcc80; }
.alert-info { background: #e0f7fa; color: #006064; border: 1px solid #80deea; }

/* 徽章 */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.badge-high { background: #ffebee; color: var(--danger); }
.badge-mid { background: #fff3e0; color: var(--warning); }
.badge-low { background: #f5f5f5; color: var(--text-light); }
.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: #e8f5e9; color: var(--success); }

/* 登录页 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a237e 0%, #00bcd4 100%);
    padding: 20px;
}
.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    width: 100%;
    max-width: 520px;
}
.login-card h1 {
    text-align: center;
    color: var(--primary);
    margin: 0 0 8px 0;
    font-size: 24px;
}
.login-card .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 14px;
}
.login-card .btn { width: 100%; padding: 12px; font-size: 16px; }
.login-hint {
    margin-top: 20px;
    padding: 12px;
    background: var(--primary-bg);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-light);
}
.login-hint code {
    background: white;
    padding: 1px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* 分析结果卡片 */
.localization-card {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 5px solid var(--warning);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.localization-card .label { font-size: 13px; color: var(--text-light); }
.localization-card .value { font-size: 20px; font-weight: bold; color: var(--warning); margin-top: 4px; }

.nall-worksheet-table th { background: #fff3e0; color: #e65100; }
.nall-worksheet-table td { vertical-align: top; }

/* AI结果 */
.ai-result {
    background: #f0f4ff;
    border-radius: 8px;
    padding: 16px;
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.8;
    max-height: 500px;
    overflow-y: auto;
}

/* 报告预览 */
.report-preview {
    background: white;
    max-width: 210mm;
    margin: 0 auto;
    padding: 20mm;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 297mm;
}
.report-preview h1 {
    text-align: center;
    color: var(--primary);
    font-size: 22px;
    margin-bottom: 4px;
}
.report-preview h2 {
    color: var(--primary);
    font-size: 16px;
    border-bottom: 2px solid var(--primary-bg);
    padding-bottom: 4px;
    margin-top: 20px;
}
.report-preview table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.report-preview th, .report-preview td { border: 1px solid #ccc; padding: 6px 10px; }
.report-preview th { background: var(--primary-bg); }

/* 分页 */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
}
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    text-align: center;
}
.stat-card .num { font-size: 28px; font-weight: bold; color: var(--primary); }
.stat-card .label { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-light); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }

/* 响应式 - 平板 */
@media (max-width: 992px) {
    .container { padding: 12px; }
    .card-body { padding: 16px; }
    .form-row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
}

/* 响应式 - 手机 */
@media (max-width: 768px) {
    .navbar-inner { flex-wrap: wrap; height: auto; padding: 8px 0; }
    .mobile-toggle { display: block; }
    .navbar-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 8px 0;
    }
    .navbar-menu.show { display: flex; }
    .navbar-menu a { padding: 10px 14px; }
    .navbar-user { width: 100%; justify-content: flex-end; padding: 4px 0; }

    .container { padding: 10px; }
    .card-body { padding: 14px; }
    .card-header { padding: 10px 14px; font-size: 14px; }

    .form-row { grid-template-columns: 1fr; gap: 12px; }
    .btn-group { flex-direction: column; }
    .btn-group .btn { width: 100%; text-align: center; }

    .table { font-size: 12px; }
    .table th, .table td { padding: 6px 8px; }

    .tabs { flex-wrap: nowrap; }
    .tab { padding: 8px 12px; font-size: 13px; }

    .login-card { padding: 24px; }
    .login-card h1 { font-size: 20px; }

    .report-preview { padding: 10mm; font-size: 12px; }
    .report-preview h1 { font-size: 18px; }
    .report-preview h2 { font-size: 14px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card .num { font-size: 22px; }

    .localization-card .value { font-size: 16px; }
}

/* 打印样式 */
@media print {
    .navbar, .btn, .no-print, .tabs { display: none !important; }
    .container { padding: 0; max-width: 100%; }
    .card { box-shadow: none; border: none; }
    .report-preview { box-shadow: none; padding: 0; max-width: 100%; }
    body { background: white; }
}

/* 操作按钮组 - 响应式设计 */
.action-btn-group {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
}
.action-btn-form {
    flex: 1;
    margin: 0;
    display: flex;
}
.action-btn {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 46px;
}
.action-btn-form .action-btn {
    width: 100%;
}

/* 平板端：2x2网格 */
@media (max-width: 900px) {
    .action-btn-group {
        flex-wrap: wrap;
    }
    .action-btn-form,
    .action-btn {
        flex: 0 0 calc(50% - 5px);
        min-width: calc(50% - 5px);
    }
}

/* 手机端：垂直排列 */
@media (max-width: 560px) {
    .action-btn-group {
        flex-direction: column;
        gap: 8px;
    }
    .action-btn-form,
    .action-btn {
        flex: 0 0 100%;
        min-width: 100%;
        width: 100%;
    }
    .action-btn {
        font-size: 13px;
        padding: 10px 12px;
        height: 42px;
    }
}

/* ============================================================
   AI 接入模块（设置页）
   —— 整合原"默认平台 + 7 张平台卡片"，已接入的默认可见、
      未接入的折叠收起；状态用圆点+文字表达，与应用其余页面
      的纯文字风格保持一致（不使用 emoji 图标）
   ============================================================ */
.section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.section-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.section-head .count {
    font-weight: 400;
    font-size: 12px;
    color: var(--text-light);
}

.status-box {
    padding: 8px 10px;
    background: #f7f8fa;
    border-radius: 6px;
    font-size: 13px;
    min-height: 40px;
    line-height: 1.8;
}
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    background: #f5f5f5;
    color: var(--text-light);
    margin: 2px 4px 2px 0;
    white-space: nowrap;
}

/* 接入状态指示：圆点 + 文字 */
.prov-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #bdbdbd;
    display: inline-block;
    flex: 0 0 auto;
}
.prov-dot-ok { background: var(--success); }
.prov-dot-fail { background: var(--danger); }
.prov-dot-unverified { background: var(--warning); }
.prov-text-ok { color: var(--success); }
.prov-text-fail { color: var(--danger); }
.prov-text-unverified { color: var(--warning); }

/* 已接入平台：可折叠条目 */
details.prov-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
    overflow: hidden;
}
details.prov-item > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    background: #fafbfc;
    list-style: none;
    font-size: 14px;
}
details.prov-item > summary::-webkit-details-marker { display: none; }
details.prov-item > summary::marker { content: ''; }
details.prov-item[open] > summary {
    border-bottom: 1px solid var(--border);
    background: var(--primary-bg);
}
.prov-summary-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    min-width: 0;
}
.prov-summary-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
    white-space: nowrap;
}
.toggle-hint { color: var(--primary); }
.toggle-hint::after { content: '展开'; }
details.prov-item[open] .toggle-hint::after { content: '收起'; }
.prov-body { padding: 16px; }
.prov-detail {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--text-light);
}

/* 未接入平台：整体折叠 */
details.prov-more {
    margin-top: 6px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: #fafbfc;
}
details.prov-more > summary {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    list-style: none;
}
details.prov-more > summary::-webkit-details-marker { display: none; }
details.prov-more > summary::marker { content: ''; }
.prov-more-body { padding: 0 16px 8px; }

details.prov-inline { border-top: 1px solid var(--border); }
details.prov-inline > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 0;
    cursor: pointer;
    list-style: none;
}
details.prov-inline > summary::-webkit-details-marker { display: none; }
details.prov-inline > summary::marker { content: ''; }
.prov-row-info strong {
    display: block;
    font-size: 13px;
    color: var(--text);
}
.prov-row-info small {
    color: var(--text-light);
    font-size: 12px;
}
.prov-inline-action {
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 12px;
    white-space: nowrap;
}
details.prov-inline[open] .prov-inline-action {
    background: var(--primary);
    color: #fff;
}
.prov-inline-config { padding: 4px 0 14px; }

/* 手机端：AI 接入条目改为纵向排布 */
@media (max-width: 560px) {
    details.prov-item > summary { flex-direction: column; align-items: flex-start; gap: 6px; }
    .prov-summary-right { flex-wrap: wrap; }
}
