/* 「设置」板块里照金聚诚后台抄的三页（AI 用量、用量明细、操作日志 / 登录日志）的样式。
   数值照金聚诚 AiUsageView.vue、AgentRunStatsPanel.vue、AiUsagePeriodPicker.vue、AiUsageTrendChart.vue、AuditLogView.vue 和 styles/desk.css：
   浅灰底白卡、不画框、筛选是一排白色圆胶囊、字一律深色。品牌蓝换成新万希的（--blue）。 */
.content:has(.st-page) { background: #f5f6f8; }
.st-page { width: min(1480px, 100%); margin: 0 auto; padding: 20px 32px 40px; min-width: 0; color: #1d2129; font-size: 14px; line-height: 1.6; }
.st-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.st-head h1 { margin: 0; font-size: 24px; font-weight: 700; color: #1d2129; }
.st-actions { display: flex; gap: 10px; }
.st-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 18px; background: #fff; color: #1d2129; font-size: 14px; text-decoration: none; border: 0; cursor: pointer; }
.st-btn:hover { color: var(--blue, #1274a5); background: #edf1f8; }
.st-select, .st-search, .st-days { min-height: 40px; border: 0; border-radius: 20px; background: #fff; color: #1d2129; font: inherit; font-size: 14px; }
.st-select { width: 170px; padding: 0 30px 0 14px; cursor: pointer; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d2129' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; }
.st-select:focus-visible, .st-search:focus-within { outline: 2px solid #c9d8ff; outline-offset: 1px; }
.st-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.st-search { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 200px; max-width: 280px; padding: 0 14px; }
.st-search svg { width: 16px; height: 16px; fill: none; stroke: #1d2129; stroke-width: 2; flex: none; }
.st-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: #1d2129; }
.st-days { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; }
.st-days input, .period-calendar input { border: 0; outline: 0; background: transparent; font: inherit; color: #1d2129; }
.st-tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 19px; background: #e9ebef; margin-bottom: 14px; }
.st-tabs button { height: 32px; padding: 0 16px; border: 0; border-radius: 16px; background: none; color: #1d2129; font: inherit; font-size: 14px; cursor: pointer; }
.st-tabs button:hover:not(.on) { background: #dfe3ea; }
.st-tabs button.on { background: #fff; color: var(--blue, #1274a5); font-weight: 600; }
/* 列表：一行一条的白卡（金聚诚 .lx-table / .lx-tr） */
.st-table { min-height: 120px; overflow-x: auto; border-radius: 12px; background: #fff; }
.st-tr { display: grid; grid-template-columns: var(--st-cols); align-items: center; gap: 0 20px; min-width: 860px; padding: 10px 22px; border-top: 1px solid #f0f1f4; color: #1d2129; font-size: 14px; font-variant-numeric: tabular-nums; }
.st-tr:first-child { border-top: 0; }
.st-tr:not(.head):hover { background: #fafbfc; }
.st-tr.head { padding-top: 12px; padding-bottom: 12px; font-weight: 600; }
.st-tr > * { min-width: 0; }
.st-tr .end { justify-self: end; text-align: right; }
.st-tr .mid { justify-self: center; text-align: center; }
.st-table.click .st-tr:not(.head) { cursor: pointer; }
.st-tr:focus-visible { outline: 2px solid #c9d8ff; outline-offset: -2px; }
.st-cut { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-time { white-space: nowrap; }
.st-pill { display: inline-block; padding: 0 8px; border-radius: 4px; background: #f2f3f5; color: #1d2129; font-size: 13px; font-style: normal; font-weight: 500; line-height: 22px; white-space: nowrap; }
.st-pill.ok { background: #e8f7ef; color: #12784b; }
.st-pill.info { background: #edf3ff; color: var(--blue, #1274a5); }
.st-pill.bad { background: #fdeeef; color: #c8322f; }
.st-empty { padding: 48px 20px; text-align: center; color: #1d2129; }
.st-pager { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 14px; }
.st-pager label { display: inline-flex; align-items: center; gap: 8px; }
.st-pager select { min-height: 32px; border: 0; border-radius: 16px; padding: 0 12px; background: #fff; font: inherit; color: #1d2129; }
.st-pager .pager { display: inline-flex; align-items: center; gap: 4px; }
/* 日志 */
.al-count { margin-left: auto; white-space: nowrap; }
.al-count b { color: var(--blue, #1274a5); font-weight: 600; }
.al-who { font-weight: 600; }
.al-uname { margin-left: 8px; }
.al-what.write { font-weight: 500; }
.al-what.danger { color: #c8322f; font-weight: 500; }
.st-drawer { margin: 0 0 0 auto; width: 480px; max-width: 92vw; height: 100vh; max-height: 100vh; border: 0; padding: 24px 28px; background: #fff; color: #1d2129; }
.st-drawer::backdrop { background: rgba(22, 30, 42, .22); }
.st-drawer header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.st-drawer h2 { margin: 0; font-size: 19px; }
.st-facts { display: grid; gap: 12px; margin: 0; }
.st-facts > div { display: grid; grid-template-columns: 80px 1fr; gap: 12px; }
.st-facts dt { font-weight: 600; }
.st-facts dd { margin: 0; overflow-wrap: anywhere; }
.st-facts dd.late { color: #c8322f; }
.al-detail-h { margin: 22px 0 8px; font-size: 15px; }
.al-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.al-pre { margin: 0; padding: 12px 14px; border-radius: 10px; background: #f5f6f8; white-space: pre-wrap; overflow-wrap: anywhere; }
/* 统计周期：按年 / 按月 / 按日 / 范围一排白胶囊 */
.usage-period { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.period-modes { display: inline-flex; align-items: center; gap: 8px; }
.period-modes button { height: 34px; padding: 0 16px; border: 0; border-radius: 17px; background: #fff; color: #1d2129; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.period-modes button:hover:not(.active) { background: #edf1f8; }
.period-modes button.active { background: var(--blue, #1274a5); color: #fff; font-weight: 600; }
.period-calendar { display: flex; min-width: 0; align-items: center; gap: 6px; border-radius: 20px; background: #fff; overflow: hidden; min-height: 40px; }
.period-calendar:focus-within { box-shadow: 0 0 0 3px rgb(18 116 165 / 14%); }
.period-calendar.is-range { padding: 0 14px; }
.period-calendar input { text-align: center; min-height: 40px; }
.period-calendar input[type=number] { width: 90px; }
.period-arrow { width: 36px; min-width: 36px; height: 40px; border: 0; background: #fff; display: grid; place-items: center; color: #1d2129; cursor: pointer; }
.period-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.period-arrow:hover, .period-current:hover { color: var(--blue, #1274a5); background: #edf1f8; }
.period-current { height: 34px; padding: 0 14px; border: 0; border-radius: 17px; background: #fff; color: var(--blue, #1274a5); font: inherit; font-size: 14px; cursor: pointer; }
.period-recent.active, .period-recent.active:hover { background: var(--blue, #1274a5); color: #fff; font-weight: 600; }
/* AI 用量 */
.au-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.au-scope { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.au-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.au-card { min-width: 0; padding: 22px 24px; border-radius: 12px; background: #fff; }
.au-card-label { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 15px; font-weight: 600; }
.au-card-label > span:last-child { font-weight: 400; font-size: 14px; white-space: nowrap; }
.au-category { display: inline-flex; align-items: center; gap: 8px; }
.au-category i { width: 8px; height: 8px; border-radius: 50%; }
.au-amount { display: block; font-size: clamp(28px, 2.5vw, 36px); line-height: 1.3; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 18px; overflow-wrap: anywhere; letter-spacing: -0.7px; }
.au-amount small { font-size: 0.65em; padding-right: 3px; font-weight: 500; }
.au-card-note { margin: 6px 0 20px; }
.au-token-grid, .au-media-grid { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid #f0f1f4; }
.au-token-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.au-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.au-token-grid > div, .au-media-grid > div { display: grid; gap: 4px; min-width: 0; }
.au-token-grid span, .au-media-grid span { font-size: 13px; }
.au-media-grid small { font-size: 13px; margin-left: 4px; }
.au-token-grid strong, .au-media-grid strong { color: var(--blue, #1274a5); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.au-share-bar { display: flex; height: 7px; border-radius: 6px; overflow: hidden; background: #f2f3f5; margin-top: 26px; }
.au-total-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; font-size: 13px; margin-top: 13px; }
.au-total-foot strong { font-weight: 600; }
.au-panel { min-width: 0; margin-top: 16px; padding: 22px 24px; border-radius: 12px; background: #fff; }
.au-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.au-panel-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.au-view-switch, .au-breakdown-tabs { display: flex; padding: 3px; border-radius: 17px; gap: 2px; background: #f2f3f5; }
.au-view-switch button, .au-breakdown-tabs button { height: 28px; padding: 0 14px; border: 0; border-radius: 14px; background: none; color: #1d2129; font: inherit; font-size: 14px; cursor: pointer; }
.au-view-switch button:hover:not(.on), .au-breakdown-tabs button:hover:not(.on) { background: #e6e9ef; }
.au-view-switch button.on, .au-breakdown-tabs button.on { background: var(--blue, #1274a5); color: #fff; font-weight: 600; }
.au-trend-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #f0f1f4; padding: 16px 0; margin-top: 18px; }
.au-trend-tools label { display: flex; align-items: center; gap: 12px; }
.au-trend-tools select { min-height: 34px; border: 1px solid #dcdfe5; border-radius: 17px; background: #fff; color: #1d2129; font: inherit; padding: 0 12px; cursor: pointer; }
.au-table-scroll { overflow-x: auto; }
.au-trend-table { min-width: 620px; }
.au-breakdown-body { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); align-items: center; gap: 28px; margin-top: 18px; }
.au table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.au th { text-align: left; font-weight: 600; background: #f5f6f8; color: #1d2129; }
.au td, .au th { padding: 12px; border-bottom: 1px solid #f0f1f4; }
.au th:first-child { border-radius: 8px 0 0 8px; }
.au th:last-child { border-radius: 0 8px 8px 0; }
.au td:not(:first-child), .au th:not(:first-child) { text-align: right; white-space: nowrap; }
.au tbody tr:last-child td { border-bottom: 0; }
.au-distribution-table td:first-child { width: 30%; }
.au-distribution-table td:nth-child(2) { width: 35%; }
.au-ratio { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.au-ratio > div { width: 65%; min-width: 40px; height: 6px; border-radius: 3px; overflow: hidden; background: #edf0f4; }
.au-ratio i { display: block; height: 100%; background: var(--blue, #1274a5); border-radius: inherit; }
.au-ratio > span { width: 52px; }
.au-money { font-weight: 600; }
.au-account { background: transparent; border: 0; color: var(--blue, #1274a5); font: inherit; padding: 0; min-height: 28px; cursor: pointer; text-align: left; }
.au-account:hover { text-decoration: underline; }
.au-caption { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; padding: 11px 14px; border-radius: 10px; background: #eef6fb; }
.au-caption svg { flex: none; margin-top: 3px; fill: none; stroke: var(--blue, #1274a5); stroke-width: 2; }
.au-no-calls { text-align: center; }
/* 趋势图、环形图 */
.chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; padding: 6px 0 20px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 2px; }
.chart-unit { margin-left: auto; }
.chart-scroll { overflow-x: auto; }
/* 全站给图标定过 svg 的高度，这里要写明高度跟着宽度走，不然整张图被压成一小条 */
.usage-chart svg { width: 100%; height: auto; display: block; max-height: 340px; }
/* 全站的 svg 是按线条图标定的样式（不填色、描边）；图表要关掉描边，不然每根柱子和每个字都多一圈黑边 */
.usage-chart svg { stroke: none; stroke-width: 0; }
.donut-figure svg { stroke-linecap: butt; }
.chart-grid { stroke: #e5e6eb; stroke-width: 0.75; stroke-dasharray: 3 5; }
.chart-label { fill: #1d2129; font-size: 12px; }
.chart-hover { fill: transparent; }
.usage-chart g[data-point]:hover .chart-hover { fill: #f1f1f2; opacity: .7; }
.chart-readout { display: flex; flex-wrap: wrap; gap: 8px 20px; min-height: 28px; align-items: center; margin-top: 10px; }
.chart-readout strong, .chart-readout b { font-weight: 600; }
.donut { display: grid; justify-items: center; gap: 14px; padding: 8px 4px; }
.donut-figure { position: relative; width: 200px; height: 200px; }
.donut-figure svg { width: 100%; height: 100%; }
.donut-track { fill: none; stroke: #f2f3f5; }
.donut-arc { fill: none; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.donut-center span { font-size: 13px; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; max-width: 280px; }
.donut-legend li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; }
.donut-legend i { width: 9px; height: 9px; border-radius: 2px; }
.donut-legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
/* 智能体运行 */
.ars { min-width: 0; margin-top: 16px; padding: 22px 24px; border-radius: 12px; background: #fff; }
.ars-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.ars-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.ars-kpis > div { display: grid; gap: 4px; min-width: 0; padding: 14px 16px; border-radius: 10px; background: #f5f7fa; }
.ars-kpis strong { font-size: 24px; font-weight: 600; color: var(--blue, #1274a5); font-variant-numeric: tabular-nums; }
.ars-kpis strong.warn { color: #c8322f; }
.ars-kpis em { font-style: normal; }
.ars-origins { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px; }
.ars-table { overflow-x: auto; margin-top: 16px; }
.ars table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ars th { text-align: left; font-weight: 600; background: #f5f6f8; }
.ars td, .ars th { padding: 11px 12px; border-bottom: 1px solid #f0f1f4; }
.ars th:first-child { border-radius: 8px 0 0 8px; }
.ars th:last-child { border-radius: 0 8px 8px 0; }
.ars td:not(:first-child), .ars th:not(:first-child) { text-align: center; white-space: nowrap; }
.ars tbody tr:last-child td { border-bottom: 0; }
.ars td.warn { color: #c8322f; font-weight: 600; }
.ars-empty { padding: 28px 12px; text-align: center; margin: 0; }
/* 用量明细的合计卡 */
.ur-sum { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 12px; align-items: end; padding: 18px 24px; border-radius: 12px; background: #fff; margin-bottom: 14px; }
.ur-sum > div { display: grid; gap: 4px; min-width: 0; }
.ur-sum .au-amount { margin-top: 2px; font-size: 30px; }
.ur-sum strong { font-size: 16px; font-weight: 600; color: var(--blue, #1274a5); font-variant-numeric: tabular-nums; }
.ur-money { font-weight: 600; }
.ur-est { margin-left: 6px; }
@media (max-width: 1150px) { .au-breakdown-body { grid-template-columns: 1fr; } .au-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .au-total { grid-column: 1 / -1; } .ars-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ur-sum { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .st-page { padding: 16px; } .au-cards, .ars-kpis { grid-template-columns: 1fr; } .au-total { grid-column: auto; } .st-select { width: 100%; } .period-modes { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); } }
