
/* 右侧「历史记录」：本窗口自己的历次会话，点一条切回去接着聊 */
.agent-hist-panel {
    margin-bottom: 12px;
}
.agent-hist {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 420px;
    overflow: auto;
}
.agent-hist-item {
    border-bottom: 1px solid #f0f2f5;
}
.agent-hist-item:last-child {
    border-bottom: 0;
}
.agent-hist-item > a {
    display: block;
    padding: 7px 8px;
    color: #444c69;
    text-decoration: none;
}
.agent-hist-item > a:hover {
    background: #f4f8ff;
}
.agent-hist-item.active > a {
    background: #eaf3ff;
    border-left: 3px solid #1688f1;
}
.agent-hist-title {
    display: block;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-all;
}
.agent-hist-meta {
    display: block;
    margin-top: 2px;
    color: #8b93a7;
    font-size: 12px;
}

/* 🔴 左对话 / 右历史 的分栏：不用 col-md-8 + col-md-4（栅格在部分宽度下会把右栏挤到下面），
     自己用 flex 分栏 —— 左右顶端对齐、右栏固定宽度、窄屏（<992px）自动上下堆叠。 */
.agent-layout {
    display: flex;
    align-items: stretch;  /* 🔴 两栏等高：右栏跟着左栏长，上下都是齐的（不是 flex-start 那种一长一短） */
    gap: 14px;
}
.agent-layout > .agent-main {
    flex: 1 1 auto;
    min-width: 0;          /* 没有它，长 JSON/表格会把主区撑破、把右栏顶下去 */
}
/* 🔴 历史记录**默认收起**，点顶部「历史记录」才从右侧滑出（抽屉）。
     不再常驻右栏：常驻会把对话区挤窄，而多数时候会员并不翻历史。 */
.agent-hist-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1050;
    width: 320px;
    max-width: 92vw;
    height: 100%;
    overflow: auto;
    padding: 12px;
    background: #fff;
    box-shadow: -2px 0 14px rgba(0, 0, 0, .18);
}
.agent-hist-drawer.open {
    display: block;
}
.agent-hist-drawer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}
.agent-hist-mask {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1049;
    background: rgba(0, 0, 0, .25);
}
.agent-hist-mask.open {
    display: block;
}
.agent-hist-drawer .agent-hist-panel {
    margin-bottom: 0;
}
.agent-hist-drawer .agent-hist {
    max-height: none;
    min-height: 0;
}

/* 「可查接口」清单：接口有几十个，表格自己滚，别把气泡撑到天上去 */
.agent-api-wrap {
    max-height: 320px;
    overflow: auto;
    margin: 6px 0;
}
.agent-api-row {
    cursor: pointer;
}
.agent-api-row:hover {
    background: #f4f8ff;
}
.agent-api-check-cell {
    width: 30px;
    text-align: center;
}
/* 「挑接口」弹窗（可搜 + 可多选） */
.agent-picker {
    padding: 2px;
}
.agent-picker-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 6px;
    font-size: 12px;
}
.agent-picker-list {
    max-height: 300px;
    overflow: auto;
    border: 1px solid #eee;
    border-radius: 4px;
}
.agent-picker-desc {
    color: #8b93a7;
    font-size: 12px;
}
.agent-picker-price {
    width: 92px;
    text-align: right;
    white-space: nowrap;
}
.agent-picker-tip {
    margin-top: 8px;
    color: #8b93a7;
    font-size: 12px;
}

/* 顶部统计条：能调多少 / 用了多少 / 成功率 / 余额
   🔴 这条规则曾被一次编辑截断（只剩 `.06);` 和一个游离的 `}`），
   结果整条统计条没有 flex/背景/边框，看着就是"样式没了"。补回。 */
.mrdata-statbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.mrdata-stat {
    flex: 1 1 0;
    min-width: 110px;
    padding: 0 18px;
    border-right: 1px dashed #e7e7e7;
}

.mrdata-stat:first-child {
    padding-left: 0;
}

.mrdata-stat:last-child {
    padding-right: 0;
    border-right: 0;
}

.mrdata-stat .k {
    display: block;
    font-size: 12px;
    color: #9aa0ad;
    line-height: 1.4;
}

.mrdata-stat .v {
    display: block;
    font-size: 22px;
    font-weight: 600;
    color: #444c69;
    line-height: 1.35;
}

.mrdata-stat .v small {
    font-size: 12px;
    font-weight: normal;
    color: #9aa0ad;
    margin-left: 2px;
}

.mrdata-stat-money {
    text-align: right;
}

.mrdata-stat-money .v {
    color: #f39c12;
}

.mrdata-stat-btns {
    display: block;
    margin-top: 6px;
}

.mrdata-stat-btns .btn {
    margin-left: 4px;
}

/* --------------------------------------------------------------------------
   2. 工具条(搜索 / 排序 / 分类筛选)
   -------------------------------------------------------------------------- */
.mrdata-toolbar {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    padding: 12px 15px 4px;
    margin-bottom: 12px;
}

.mrdata-toolbar-row {
    margin-bottom: 8px;
}

.mrdata-toolbar-count {
    line-height: 34px;
    text-align: right;
    color: #9aa0ad;
    font-size: 12px;
}

.mrdata-toolbar-count strong {
    color: #1688f1;
    font-size: 14px;
}

.mrdata-search {
    position: relative;
}

.mrdata-search > i {
    position: absolute;
    top: 10px;
    left: 11px;
    color: #c2c6cf;
    pointer-events: none;
}

.mrdata-search .form-control {
    padding-left: 30px;
}

.mrdata-chips {
    border-top: 1px dashed #eef0f3;
    padding-top: 10px;
    margin-bottom: 4px;
}

.mrdata-chip {
    display: inline-block;
    margin: 0 6px 8px 0;
    padding: 4px 12px;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    background: #fafbfc;
    color: #6b7183;
    font-size: 13px;
    line-height: 20px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.mrdata-chip:hover,
.mrdata-chip:focus {
    border-color: #1688f1;
    color: #1688f1;
    text-decoration: none;
}

.mrdata-chip.active {
    background: #444c69;
    border-color: #444c69;
    color: #fff;
}

.mrdata-chip .badge {
    background: #e9ebef;
    color: #6b7183;
    font-weight: normal;
    font-size: 11px;
}

.mrdata-chip.active .badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* --------------------------------------------------------------------------
   3. 接口卡片(接口集市)
   -------------------------------------------------------------------------- */
.mrdata-cat-block {
    margin-bottom: 10px;
}

.mrdata-cat-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    padding: 8px 0 6px;
    margin: 10px 0 0;
    border-bottom: 1px solid #eee;
}

.mrdata-cat-title small {
    font-weight: normal;
    color: #999;
    margin-left: 6px;
}

/* row 改用 flex:同一行卡片自动等高,按钮才能沉到底部对齐 */
.mrdata-card-list {
    display: flex;
    flex-wrap: wrap;
    margin-top: 15px;
}

.mrdata-card-list > .mrdata-card-col {
    display: flex;
    flex: 0 0 auto;
}

.mrdata-card-list > .mrdata-card-col > .mrdata-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
}

.mrdata-card {
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mrdata-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.mrdata-card.is-open {
    border-color: #d8ece7;
}

.mrdata-card .caption {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 14px 16px 16px;
}

.mrdata-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mrdata-card-head h3 {
    flex: 1 1 auto;
    margin: 0 8px 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.45;
}

.mrdata-card-head .label {
    flex: 0 0 auto;
    margin-top: 3px;
    font-weight: normal;
}

.mrdata-card-desc {
    flex: 1 1 auto;
    min-height: 36px;
    margin-bottom: 10px;
    color: #8b90a0;
    font-size: 12px;
    line-height: 1.7;
}

.mrdata-card-code {
    margin-bottom: 10px;
}

.mrdata-card-code code {
    background: #f5f6f8;
    color: #444c69;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
}

.mrdata-card-code code.is-off {
    background: #f7f7f7;
    color: #bbb;
}

/* 卡片上标出"该接口属于哪个套餐" */
.mrdata-card-pkg {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    background: #eef1f7;
    color: #444c69;
    font-size: 11px;
    border-radius: 3px;
}

.mrdata-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 10px;
    margin-bottom: 12px;
    border-top: 1px dashed #eef0f3;
    color: #9aa0ad;
    font-size: 12px;
}

.mrdata-card-meta > span {
    margin-right: 14px;
    white-space: nowrap;
}

.mrdata-card-meta i {
    margin-right: 3px;
}

.mrdata-card-meta .mrdata-price {
    color: #f39c12;
    font-weight: 600;
}

.mrdata-card-meta .mrdata-price em {
    font-style: normal;
    font-weight: normal;
    color: #c8ccd4;
}

.mrdata-card-actions {
    margin-top: auto;
}

.mrdata-card-actions .btn {
    margin-right: 6px;
}

#mrdataEmpty {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   4. 接口文档页(摘要头 / 右侧目录 / 代码块复制)
   -------------------------------------------------------------------------- */
.mrdata-doc-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8f9fb 0%, #eef1f7 100%);
    border: 1px solid #e7e7e7;
    border-left: 4px solid #444c69;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 14px;
}

.mrdata-doc-head-main {
    flex: 1 1 auto;
    min-width: 240px;
}

.mrdata-doc-head-main h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #444c69;
}

.mrdata-doc-head-sub {
    margin: 0;
    line-height: 2;
}

.mrdata-doc-head-sub code {
    background: #e7eaf1;
    color: #444c69;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 6px;
}

.mrdata-doc-head-sub .label {
    font-weight: normal;
    margin-right: 6px;
}

.mrdata-doc-head-side {
    display: flex;
    flex: 0 0 auto;
    text-align: right;
}

.mrdata-doc-stat {
    margin-left: 28px;
}

.mrdata-doc-stat .k {
    display: block;
    font-size: 12px;
    color: #9aa0ad;
}

.mrdata-doc-stat .v {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #444c69;
    line-height: 1.4;
}

.mrdata-doc-stat .v small {
    font-size: 11px;
    font-weight: normal;
    color: #9aa0ad;
}

/* 右侧目录:滚动时吸附,并高亮当前小节 */
.mrdata-toc {
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    padding: 12px 0 6px;
    font-size: 13px;
}

.mrdata-toc-title {
    padding: 0 14px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid #f0f1f4;
    font-weight: 600;
    color: #444c69;
}

.mrdata-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mrdata-toc li a {
    display: block;
    padding: 6px 14px;
    color: #6b7183;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.mrdata-toc li a:hover {
    background: #f7f8fa;
    color: #1688f1;
    text-decoration: none;
}

.mrdata-toc li a.active {
    border-left-color: #1688f1;
    background: #f2f8ff;
    color: #1688f1;
    font-weight: 600;
}

/* 代码块复制按钮:挂在 pre 外层容器上,否则按钮文字会被一起复制进剪贴板 */
.mrdata-pre-wrap {
    position: relative;
    margin: 0 0 10px;
}

.mrdata-pre-wrap pre {
    margin-bottom: 0;
    padding-top: 30px;
}

.mrdata-copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    opacity: 0.4;
    transition: opacity 0.15s ease;
}

.mrdata-pre-wrap:hover .mrdata-copy-btn {
    opacity: 1;
}

.mrdata-test-panel {
    border-color: #f7e3bd;
}

.mrdata-test-panel > .panel-body {
    background: #fffdf7;
}

/* --------------------------------------------------------------------------
   5. 我的 API 凭证(凭证条目 / 调用趋势图)
   -------------------------------------------------------------------------- */
.mrdata-keyrow {
    margin-bottom: 14px;
}

.mrdata-keyrow > label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #9aa0ad;
}

.mrdata-keyval {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.mrdata-keyval code {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 6px;
    padding: 7px 10px;
    background: #f5f6f8;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    color: #444c69;
    font-size: 13px;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.mrdata-keyval .btn {
    flex: 0 0 auto;
}

.mrdata-keyval .btn + .btn {
    margin-left: 6px;
}

/* 纯 CSS 柱状图,不引外部图表库 */
.mrdata-chart {
    padding-top: 4px;
}

.mrdata-chart-plot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px;
    height: 150px;
    padding: 0 2px;
    border-bottom: 1px solid #e7e7e7;
}

.mrdata-bar {
    position: relative;
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.mrdata-bar-fill {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 68%;
    max-width: 26px;
    min-height: 3px;
    background: linear-gradient(180deg, #4aa3f5 0%, #1688f1 100%);
    border-radius: 3px 3px 0 0;
    transition: height 0.3s ease;
}

.mrdata-bar:hover .mrdata-bar-fill {
    background: linear-gradient(180deg, #444c69 0%, #333a52 100%);
}

.mrdata-bar-val {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    font-size: 10px;
    line-height: 1;
    color: #9aa0ad;
    white-space: nowrap;
}

.mrdata-chart-axis {
    display: flex;
    gap: 4px;
    padding: 5px 2px 0;
}

.mrdata-chart-axis span {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-size: 10px;
    color: #b6bac3;
    white-space: nowrap;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   6. 文档正文(小节标题 / 代码块 / 表格)
   -------------------------------------------------------------------------- */
.mrdata-doc pre {
    background: #f7f7f9;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.6;
    max-height: 420px;
    overflow: auto;
}

.mrdata-doc h4 {
    margin-top: 22px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    font-weight: 600;
}

.mrdata-doc .nav-tabs > li > a {
    font-size: 12px;
}

.mrdata-doc .table > tbody > tr > td,
.mrdata-doc .table > tbody > tr > th {
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   6.1 套餐包(会员侧商品)
   -------------------------------------------------------------------------- */
.mrdata-pkg-list {
    display: flex;
    flex-wrap: wrap;
}

.mrdata-pkg-list > .mrdata-pkg-col {
    display: flex;
}

.mrdata-pkg {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
    transition: box-shadow 0.2s ease;
}

.mrdata-pkg:hover {
    box-shadow: 0 4px 14px rgba(68, 76, 105, 0.12);
}

.mrdata-pkg.is-opened {
    border-color: #d8ece7;
}

.mrdata-pkg-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.mrdata-pkg-title h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: #444c69;
}

.mrdata-pkg-title h3 small {
    margin-left: 6px;
    font-size: 12px;
    font-weight: normal;
    color: #9aa0ad;
}

.mrdata-pkg-sub {
    margin: 0;
    font-size: 12px;
}

.mrdata-pkg-sub code {
    margin-right: 6px;
    padding: 1px 5px;
    background: #f5f6f8;
    color: #6b7183;
    font-size: 11px;
    border-radius: 3px;
}

.mrdata-pkg-badge {
    flex: 0 0 auto;
}

.mrdata-pkg .panel-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.mrdata-pkg-desc {
    margin-bottom: 10px;
    color: #8b90a0;
    font-size: 12px;
    line-height: 1.7;
}

.mrdata-pkg-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px dashed #eef0f3;
    color: #9aa0ad;
    font-size: 12px;
}

.mrdata-pkg-meta > span + span {
    margin-left: 14px;
}

/* 该套餐近 30 天"在我这里的"调用产出。和 meta 分开一层:
   meta 讲"套餐是什么"(规模/开通时间),usage 讲"用出来多少" */
.mrdata-pkg-usage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: -4px 0 10px;
    padding: 8px 10px;
    background: #f7f9fb;
    border: 1px solid #e8eef4;
    border-radius: 4px;
    color: #8a9099;
    font-size: 12px;
}

.mrdata-pkg-usage strong {
    color: #333;
}

.mrdata-pkg-usage > span + span {
    margin-left: 14px;
}

/* 近 30 天没有任何调用时的弱化呈现:信息仍在,但不抢眼 */
.mrdata-pkg-usage.is-idle {
    background: #fafbfc;
    border-color: #eef1f4;
    color: #a8aeb6;
}

/* 套餐内接口清单:最多 190px 后自己滚动,避免 17 个接口把卡片撑得极高 */
.mrdata-pkg-apis {
    flex: 1 1 auto;
    max-height: 190px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    overflow-y: auto;
}

.mrdata-pkg-apis li {
    display: flex;
    align-items: center;
    padding: 5px 0;
    font-size: 12px;
    border-bottom: 1px solid #f7f8fa;
}

.mrdata-pkg-apis li:last-child {
    border-bottom: 0;
}

.mrdata-pkg-apis li > i {
    flex: 0 0 auto;
    width: 16px;
    margin-right: 4px;
    text-align: center;
    font-size: 13px;
}

.mrdata-pkg-apis li.ok > i {
    color: #18bc9c;
}

.mrdata-pkg-apis li.off > i {
    color: #c8ccd4;
}

.mrdata-pkg-apis li .nm {
    flex: 1 1 auto;
    min-width: 0;
    color: #555c6e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mrdata-pkg-apis li.off .nm {
    color: #b6bac3;
}

.mrdata-pkg-apis li .pr {
    flex: 0 0 auto;
    margin-left: 10px;
    color: #f39c12;
    font-weight: 600;
}

.mrdata-pkg-apis li .pr em {
    font-style: normal;
    font-weight: normal;
}

.mrdata-pkg-apis li .pr em.pending {
    color: #c8ccd4;
    font-size: 11px;
}

.mrdata-pkg-actions {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed #eef0f3;
}

.mrdata-pkg-actions .btn + .btn {
    margin-left: 6px;
}

/* ---- 套餐包:周期切换 + 价格(付费开通) ----
   与会员套餐页(.mrdata-vip-*)同一套视觉语言,只是作用域不同。 */
.mrdata-pkg-buybox {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f7fafd;
    border: 1px solid #e8f2fb;
    border-radius: 8px;
}

.mrdata-pkg-switch {
    display: inline-flex;
    padding: 2px;
    background: #e9f1f9;
    border-radius: 6px;
}

.mrdata-pkg-tab {
    padding: 4px 14px;
    font-size: 12px;
    color: #5b6472;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all .15s;
}

.mrdata-pkg-tab.active {
    color: #fff;
    background: #0AADFF;
    box-shadow: 0 1px 4px rgba(10, 173, 255, .35);
}

/* 「折算」角标:告诉会员这档价格是算出来的,不是运营单独配的 */
.mrdata-pkg-tab em {
    margin-left: 3px;
    font-size: 10px;
    font-style: normal;
    opacity: .7;
}

.mrdata-pkg-pricebox {
    display: flex;
    align-items: baseline;
    margin-top: 8px;
}

.mrdata-pkg-pricebox .cur {
    font-size: 13px;
    color: #f75444;
}

.mrdata-pkg-pricebox .num {
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
    color: #f75444;
}

.mrdata-pkg-pricebox .per {
    margin-left: 2px;
    font-size: 12px;
    color: #8a9099;
}

.mrdata-pkg-pricebox .eq {
    margin-left: 10px;
    font-size: 12px;
    color: #8a9099;
}

.mrdata-pkg-held {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
}

.mrdata-pkg-tip {
    margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   6.2 调用日志页(会员中心 mrdata/logs)
   -------------------------------------------------------------------------- */
.mrdata-filter-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #8a9099;
    font-weight: normal;
}

/* 按钮行要和上面的输入框底部对齐:前面有 label 占位,所以补一段上边距 */
.mrdata-filter-btns {
    padding-top: 22px;
}

.mrdata-filter-quick {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e8e8e8;
    font-size: 12px;
    color: #9aa0ad;
}

.mrdata-filter-quick a {
    margin-left: 10px;
}

/* 汇总条:与列表套用同一份筛选条件,所以这里的数字和筛选结果永远一致 */
.mrdata-log-sum {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #f7f9fb;
    border: 1px solid #e8eef4;
    border-radius: 4px;
    font-size: 13px;
    color: #7c828c;
}

.mrdata-log-sum span {
    margin-right: 20px;
}

.mrdata-log-sum strong {
    color: #333;
}

/* 日志表列多:给一个最小宽度交给 .table-responsive 横向滚动,
   而不是让"参数/套餐"这些宽列被硬挤成一条竖线 */
.mrdata-log-table {
    min-width: 940px;
    margin-bottom: 0;
}

.mrdata-log-table th {
    white-space: nowrap;
}

.mrdata-log-table td,
.mrdata-log-table th {
    vertical-align: middle !important;
}

.mrdata-log-table code {
    background: transparent;
    padding: 0;
    color: #555;
    font-size: 12px;
    word-break: break-all;
}

/* 套餐 chip 在卡片上带左外边距,放进表格单元格要去掉,否则看着像缩进错了 */
.mrdata-log-table .mrdata-card-pkg {
    margin-left: 0;
}

/* 上游返回的失败原因:压在接口名下面一行小字,不占一整列 */
.mrdata-log-retmsg {
    margin-top: 2px;
    font-size: 12px;
    color: #9aa0ad;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   7. 数据看板(控制台首页)
   三格速览 + KPI 格 + 余额卡 + 快捷入口
   -------------------------------------------------------------------------- */
.mrdata-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 16px;
}

.mrdata-quick-item {
    flex: 1 1 200px;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(68, 76, 105, 0.06);
}

.mrdata-quick-ico {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin-right: 14px;
    border-radius: 50%;
    background: #eef4fd;
    color: #1688f1;
    font-size: 18px;
    line-height: 42px;
    text-align: center;
}

.mrdata-quick-ico.warn {
    background: #fdf3e6;
    color: #f39c12;
}

.mrdata-quick-ico.ok {
    background: #e8f8f4;
    color: #18bc9c;
}

.mrdata-quick-body {
    flex: 1 1 0;
    min-width: 0;
}

.mrdata-quick-k {
    display: block;
    font-size: 12px;
    color: #9aa0ad;
}

.mrdata-quick-v {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #444c69;
    line-height: 1.3;
}

.mrdata-quick-v small {
    font-size: 12px;
    font-weight: 400;
    color: #9aa0ad;
    margin-left: 2px;
}

.mrdata-quick-v .low {
    color: #f75444;
}

/* KPI 四宫格:今日 / 近 7 天 / 近 30 天 / 成功率 */
.mrdata-kpi {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.mrdata-kpi-item {
    flex: 1 1 25%;
    min-width: 120px;
    padding: 16px 14px;
    text-align: center;
    border-right: 1px dashed #e7e7e7;
}

.mrdata-kpi-item:last-child {
    border-right: 0;
}

.mrdata-kpi-item .k {
    display: block;
    font-size: 12px;
    color: #9aa0ad;
    margin-bottom: 4px;
}

.mrdata-kpi-item .v {
    display: block;
    font-size: 22px;
    font-weight: 600;
    color: #444c69;
}

.mrdata-kpi-item .v small {
    font-size: 12px;
    font-weight: 400;
    color: #9aa0ad;
}

.mrdata-kpi-item .s {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #9aa0ad;
}

/* 余额卡 */
.mrdata-wallet {
    background: linear-gradient(135deg, #444c69 0%, #5a6489 100%);
    border-radius: 6px;
    padding: 18px 20px;
    color: #fff;
}

.mrdata-wallet .wk {
    font-size: 12px;
    opacity: 0.75;
}

.mrdata-wallet .wv {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.25;
    margin: 2px 0 12px;
    word-break: break-all;
}

.mrdata-wallet .wv small {
    font-size: 15px;
    font-weight: 400;
    opacity: 0.8;
}

.mrdata-wallet .wf {
    font-size: 12px;
    opacity: 0.7;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 10px;
    margin-top: 2px;
}

.mrdata-wallet .btn {
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.mrdata-wallet .btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* 快捷入口 */
.mrdata-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mrdata-links li {
    border-bottom: 1px dashed #e7e7e7;
}

.mrdata-links li:last-child {
    border-bottom: 0;
}

.mrdata-links a {
    display: block;
    padding: 11px 2px;
    color: #444c69;
}

.mrdata-links a:hover {
    color: #1688f1;
    text-decoration: none;
}

.mrdata-links .fa-fw {
    color: #9aa0ad;
    margin-right: 6px;
}

.mrdata-links .fa-angle-right {
    float: right;
    margin-top: 3px;
    color: #c6cad4;
}

/* --------------------------------------------------------------------------
   8. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .mrdata-stat {
        flex: 1 1 45%;
        margin-bottom: 12px;
        padding-left: 0;
        border-right: 0;
    }

    .mrdata-stat-money {
        text-align: left;
    }

    .mrdata-toolbar-count {
        text-align: left;
    }

    .mrdata-toolbar-row > div + div {
        margin-top: 8px;
    }

    .mrdata-doc-head-side {
        width: 100%;
        margin-top: 14px;
        text-align: left;
    }

    .mrdata-doc-stat {
        margin-left: 0;
        margin-right: 28px;
    }

    /* 小屏卡片是整宽的,高度不受限,就不必让接口清单内部滚动了 */
    .mrdata-pkg-apis {
        max-height: none;
    }

    /* 筛选表单在小屏上换行,按钮行不再需要补 label 的高度 */
    .mrdata-filter-btns {
        padding-top: 0;
        margin-top: 12px;
    }

    .mrdata-log-sum span {
        margin-right: 14px;
    }
}

/* 宽屏下接口卡片由每行 2 个自适应为 3~4 个,避免单卡被拉得过宽 */
@media (min-width: 1500px) {
    .mrdata-card-list > .col-md-6 {
        width: 33.33333333%;
    }
}

@media (min-width: 1900px) {
    .mrdata-card-list > .col-md-6 {
        width: 25%;
    }
}

/* --------------------------------------------------------------------------
   风控智能体对话窗口(会话层:会话 → 任务 → 调用)
   配色沿用本站主色 #444c69 / 强调蓝 #1688f1 / 描边 #e7e7e7
   -------------------------------------------------------------------------- */
/* 🔴 高度由 risk.js 的 fitAgentBox() 按**视口**算（最大化、不留底部空白）;
   这里只留兜底值:JS 没跑到时也不至于塌成一团。 */
.agent-box {
    height: 62vh;
    min-height: 240px;
    overflow-y: auto;
    padding: 12px 4px;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    background: #fbfbfd;
}

/* 说明文字可折叠:默认收起,把竖向空间全让给对话区(顶栏有「使用说明」可展开) */
.agent-intro {
    display: none;
}

.agent-intro.agent-intro-open {
    display: block;
}

.agent-intro-bar {
    margin-bottom: 8px;
}

.agent-copy {
    border-style: dashed;
}

.agent-msg {
    display: flex;
    align-items: flex-start;
    margin-bottom: 14px;
}

/* 会员自己的话靠右,智能体靠左 —— 一眼分清谁在说 */
.agent-msg.agent-user {
    flex-direction: row-reverse;
}

.agent-avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #444c69;
    margin: 0 10px;
}

.agent-msg.agent-user .agent-avatar {
    background: #1688f1;
}

.agent-bubble {
    max-width: 78%;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    padding: 9px 12px;
    box-shadow: 0 1px 2px rgba(68, 76, 105, 0.05);
}

.agent-msg.agent-user .agent-bubble {
    background: #eef6ff;
    border-color: #cfe6ff;
}

/* 智能体回复里带换行(价格清单/溯源三要素),必须保留换行 */
.agent-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.75;
    color: #333;
}

.agent-tag {
    display: inline-block;
    margin-top: 6px;
    padding: 1px 7px;
    font-size: 11px;
    color: #1688f1;
    background: #eef6ff;
    border: 1px solid #cfe6ff;
    border-radius: 10px;
}

.agent-input {
    margin-top: 12px;
}

.agent-tools {
    margin-top: 8px;
}

.agent-tools .btn {
    margin-right: 6px;
    margin-bottom: 6px;
}

.agent-hint {
    font-size: 12px;
    margin-left: 4px;
}

.agent-loading {
    color: #f39c12;
    font-size: 12px;
    margin-bottom: 8px;
}

/* ---- 对话窗口内的授权表单（含表单的气泡放宽，否则一行塞不下标签+控件）---- */
.agent-bubble-wide {
    max-width: 96%;
}

.agent-form {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #e0e6ef;
    border-radius: 6px;
    background: #fff;
}

.agent-form-title {
    font-size: 13px;
    font-weight: 600;
    color: #444c69;
    margin-bottom: 6px;
}

.agent-form-note {
    font-size: 12px;
    color: #8a93a6;
    line-height: 1.7;
    margin-bottom: 8px;
}

.agent-form-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.agent-form-label {
    flex: 0 0 84px;
    font-size: 12px;
    font-weight: 500;
    color: #444c69;
    line-height: 30px;
    margin: 0;
}

.agent-form-label .req {
    color: #e74c3c;
    font-style: normal;
    margin-left: 2px;
}

.agent-form-ctl {
    flex: 1 1 auto;
    min-width: 0;
}

.agent-form-ctl .form-control {
    height: 30px;
    font-size: 12px;
}

.agent-check {
    display: inline-block;
    font-size: 12px;
    font-weight: 400;
    color: #444c69;
    line-height: 26px;
    margin: 0 14px 4px 0;
    cursor: pointer;
}

.agent-check input {
    margin-right: 4px;
    vertical-align: middle;
}
/* 接口勾选项有二十来个：默认只露已勾中的，其余收在「＋ 换个接口／加几个」里 */
.agent-check-more {
    display: none;
}
.agent-form-ctl.open .agent-check-more {
    display: inline-block;
}
.agent-form-more {
    display: inline-block;
    margin: 2px 0 6px;
    font-size: 12px;
    color: #1688f1;
    cursor: pointer;
    text-decoration: none;
}
.agent-form-more:hover {
    text-decoration: underline;
}
.agent-form-opt {
    border-left: 2px dashed #e3e7ef;
    padding-left: 8px;
}

.agent-form-actions {
    text-align: right;
    margin-top: 4px;
}

/* ---- 对话框里的结果卡 ---- */
.agent-card {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #e0e6ef;
    border-radius: 6px;
    background: #fff;
}

.agent-card-head {
    font-size: 13px;
    font-weight: 600;
    color: #444c69;
    margin-bottom: 6px;
}

.agent-card-head .agent-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 400;
    color: #1688f1;
    background: #eaf4fe;
}

.agent-card-sub {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.9;
}

.agent-card-conc {
    font-size: 12px;
    color: #444c69;
    line-height: 1.8;
    margin-bottom: 6px;
}

.agent-score {
    font-size: 13px;
    color: #444c69;
    margin: 4px 0;
}

.agent-score b {
    font-size: 18px;
    color: #1688f1;
}

.agent-table {
    width: 100%;
    margin: 6px 0;
    font-size: 12px;
}

.agent-table th,
.agent-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #f0f2f6;
    color: #444c69;
}

.agent-table th {
    color: #8a93a6;
    font-weight: 500;
    background: #fafbfd;
}

.agent-table td.bad {
    color: #e67e22;
}

.agent-card-warn {
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 4px;
    background: #fdf6ec;
    color: #b9770e;
    font-size: 12px;
    line-height: 1.7;
}

.agent-card-bill {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e7e7e7;
    font-size: 12px;
    color: #444c69;
}

/* 单接口查询卡：原始返回折叠区（结论可能被 AI 讲错，原始数据不会 —— 必须能展开核对） */
.agent-raw {
    margin-top: 6px;
    font-size: 12px;
}

.agent-raw > summary {
    cursor: pointer;
    color: #444c69;
    outline: none;
}

.agent-raw-pre {
    margin: 6px 0 0;
    max-height: 260px;
    overflow: auto;
    padding: 8px;
    background: #fafbfc;
    border: 1px solid #e7e7e7;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.agent-actions {
    margin-top: 8px;
}

.agent-actions .btn {
    margin: 0 6px 4px 0;
}

/* ---- 对话里的图表（纯 SVG，无第三方图表库）----
   图只负责"看得快"：数值与口径仍以旁边的明细表为准 */
.agent-chart {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    background: #fff;
}

.agent-chart-title {
    font-size: 12px;
    font-weight: 600;
    color: #444c69;
    margin-bottom: 2px;
}

.agent-chart-hint {
    margin-top: 4px;
    font-size: 11px;
    color: #8b93a7;
    line-height: 1.6;
}

.agent-svg {
    display: block;
    overflow: visible;
}

.agent-svg text {
    font-family: inherit;
    dominant-baseline: auto;
}

.agent-svg-label {
    font-size: 11px;
    fill: #444c69;
}

.agent-svg-val {
    font-size: 11px;
    font-weight: 600;
    fill: #444c69;
}

.agent-svg-val.agent-svg-dim {
    fill: #a9b0c0;
    font-weight: 400;
}

.agent-svg-note,
.agent-svg-legend {
    font-size: 10px;
    fill: #8b93a7;
}

.agent-svg-total {
    font-size: 20px;
    font-weight: 700;
    fill: #444c69;
}

.agent-svg-band {
    font-size: 11px;
    font-weight: 600;
    fill: #fff;
}

/* 顶部「去另一个产品窗口」按钮：两个窗口之间唯一的横向入口，做成描边蓝以示可点 */
.agent-other-link {
    margin-right: 6px;
    color: #1688f1;
    border-color: #cfe6ff;
}
