:root {
  --bg: #f6f7fb;
  --card: #fff;
  --text: #15171f;
  --muted: #74798a;
  --line: #e8eaf1;
  --line-strong: #dfe2eb;
  --primary: #6b5cff;
  --primary-strong: #5848ee;
  --primary-soft: #f0eeff;
  --success: #12a46f;
  --danger: #dc4753;
  --shadow: 0 14px 40px rgba(31, 35, 48, 0.07);
  --radius: 18px;
  --radius-sm: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% -20%, rgba(107,92,255,.08), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(20px, calc((100vw - 1220px) / 2));
  background: rgba(255,255,255,.88); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(225,227,235,.8);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 34px; height: 34px; color: var(--primary); }
.brand-mark svg { width: 100%; height: 100%; fill: currentColor; }
.brand-mark circle { fill: #fff; }
.brand-title { font-size: 15px; font-weight: 750; letter-spacing: .01em; }
.brand-subtitle { margin-top: 2px; color: #a0a4b2; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.api-pill, .status-badge, .count-badge {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid #dceee7; background: #f2fbf7; color: #25805f;
  border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 650;
}
.api-pill i, .status-badge i, .save-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(18,164,111,.1); }

.page-wrap { width: min(1180px, calc(100% - 32px)); margin: 30px auto 120px; }
.hero-card {
  position: relative; overflow: hidden;
  padding: 30px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.93); box-shadow: var(--shadow);
}
.hero-card::after { content:""; position:absolute; width:250px; height:250px; border-radius:50%; right:-105px; top:-130px; background:linear-gradient(135deg, rgba(107,92,255,.12), rgba(71,168,255,.08)); }
.hero-copy, .search-mode-switch, .search-box, .search-hint { position: relative; z-index: 1; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero-copy h1 { margin: 8px 0 7px; font-size: clamp(23px, 4vw, 32px); line-height: 1.2; letter-spacing: -.025em; }
.hero-copy p { margin: 0; color: var(--muted); font-size: 14px; }
.search-mode-switch { display:inline-grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; margin-top:22px; padding:4px; border:1px solid var(--line); border-radius:12px; background:#f6f7fa; }
.search-mode-option { min-height:38px; display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:0 14px; border:0; border-radius:9px; color:#767b8b; background:transparent; font-size:12px; font-weight:700; transition:.18s; }
.search-mode-option:hover { color:#585e6e; background:rgba(255,255,255,.7); }
.search-mode-option.active { color:var(--primary); background:#fff; box-shadow:0 2px 8px rgba(36,40,55,.08); }
.mode-icon { width:20px; height:20px; display:grid; place-items:center; border-radius:6px; background:#ececf2; color:#7b8090; font-size:10px; font-weight:850; }
.search-mode-option.active .mode-icon { background:var(--primary-soft); color:var(--primary); }
.search-box { display: grid; grid-template-columns: 1fr auto; gap: 10px; max-width: 800px; margin-top: 12px; }
.search-input-wrap { position: relative; }
.search-input-wrap svg { position: absolute; left: 15px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); fill: none; stroke: #9499a9; stroke-width: 1.8; stroke-linecap: round; }
.search-input-wrap input { width: 100%; height: 48px; padding: 0 16px 0 44px; border: 1px solid var(--line-strong); border-radius: 13px; background: #fbfbfd; outline: none; transition: .2s; }
.search-input-wrap input:focus { border-color: rgba(107,92,255,.55); box-shadow: 0 0 0 4px rgba(107,92,255,.08); background: #fff; }
.search-hint { margin-top: 10px; color: #a0a4b2; font-size: 11px; }
.search-hint code { color: #7b6cf6; background: #f5f3ff; padding: 2px 5px; border-radius: 5px; }

.primary-button, .secondary-button, .ghost-button {
  display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; padding: 0 17px; font-weight: 720; font-size: 13px; transition: .18s ease; white-space: nowrap;
}
.primary-button { border: 1px solid var(--primary); color: #fff; background: linear-gradient(135deg, #7566ff, #5e50ed); box-shadow: 0 7px 16px rgba(107,92,255,.2); }
.primary-button:hover:not(:disabled) { transform: translateY(-1px); background: var(--primary-strong); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.secondary-button { border: 1px solid var(--line-strong); color: #515667; background: #fff; }
.ghost-button { border: 1px solid transparent; color: #686d7c; background: transparent; }
.ghost-button:hover, .secondary-button:hover { background: #f5f6f9; }
.spinner { display: none; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.loading .spinner { display: inline-block; }
.loading .btn-label { opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { padding: 80px 20px; text-align: center; color: var(--muted); }
.empty-icon { width: 60px; height: 60px; margin: 0 auto 17px; display:grid; place-items:center; border-radius: 18px; background: #ebe9ff; color: var(--primary); font-size: 30px; font-weight: 300; }
.empty-state h2 { margin: 0 0 8px; color: #454958; font-size: 17px; }
.empty-state p { margin: 0; font-size: 13px; }

.results-panel, .agent-overview { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 25px rgba(31,35,48,.04); }
.results-panel { padding: 20px; }
.section-heading.compact { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin: 5px 0 0; font-size: 17px; }
.count-badge { min-width: 28px; justify-content: center; border-color: #e4e1ff; background: #f5f3ff; color: var(--primary); }
.result-list { display: grid; gap: 10px; margin-top: 15px; }
.result-item { width: 100%; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; text-align: left; transition: .16s; }
.result-item:hover { border-color: #cac4ff; background: #faf9ff; transform: translateY(-1px); }
.result-avatar { width: 42px; height: 42px; display:grid; place-items:center; border-radius: 12px; background: linear-gradient(145deg,#efedff,#e6f2ff); color: var(--primary); font-weight: 800; }
.result-copy b { display: block; font-size: 14px; }
.result-copy span { display:block; margin-top:4px; color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.result-open { color: var(--primary); font-size: 12px; font-weight: 700; }

.agent-overview { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px; }
.agent-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.avatar { flex: 0 0 auto; width: 52px; height: 52px; display:grid; place-items:center; border-radius: 16px; background: linear-gradient(145deg,#e9e6ff,#dff0ff); color: var(--primary); font-size: 20px; font-weight: 850; }
.agent-title-wrap { min-width: 0; }
.agent-title-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.agent-title-row h2 { margin: 0; font-size: 20px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.status-badge { padding: 5px 8px; font-size: 11px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 7px 14px; align-items: center; margin-top: 8px; color: var(--muted); font-size: 11px; }
.meta-row b { color: #555a69; font-weight: 650; }
.copy-chip { max-width: 310px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border:0; color:#777c8b; background:#f6f7fa; border-radius:7px; padding:5px 7px; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size:10px; }
.copy-chip b { color:var(--primary); margin-left:4px; }

.editor-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); gap: 16px; margin-top: 16px; }
.main-column, .side-column { display: grid; gap: 16px; align-content: start; }
.config-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 25px rgba(31,35,48,.035); }
.card-header { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; border: 0; padding: 18px 20px; background: #fff; text-align: left; }
.section-icon { width: 34px; height: 34px; display:grid; place-items:center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 850; }
.header-copy b { display:block; font-size:14px; }
.header-copy small { display:block; margin-top:3px; color:var(--muted); font-size:11px; font-weight:400; }
.chevron { color:#9a9eac; font-size:14px; transition:.18s; }
.config-card.collapsed .chevron { transform: rotate(180deg); }
.config-card.collapsed .card-content { display:none; }
.card-content { border-top: 1px solid #f0f1f5; padding: 20px; }
.card-content.stack { display:grid; gap:15px; }
.form-grid { display:grid; gap:15px; }
.form-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.field { display:grid; gap:7px; min-width:0; }
.field > span { color:#5f6473; font-size:12px; font-weight:650; }
.field em { color:var(--danger); font-style:normal; }
.field-tip { margin-left:4px; color:#a2a6b3; font-size:10px; font-weight:500; }
.field input, .field select, .field textarea { width:100%; border:1px solid var(--line-strong); border-radius:10px; background:#fff; color:var(--text); outline:none; transition:.18s; }
.field input, .field select { height:41px; padding:0 11px; }
.field textarea { min-height:220px; padding:12px 13px 32px; resize:vertical; line-height:1.65; }
.field input:focus, .field select:focus, .field textarea:focus { border-color:rgba(107,92,255,.6); box-shadow:0 0 0 3px rgba(107,92,255,.07); }
.field.readonly input { color:#989ca9; background:#f7f8fa; }
.textarea-field { position:relative; }
.counter { position:absolute; right:11px; bottom:9px; color:#a3a7b3 !important; font-size:10px !important; font-weight:500 !important; }
.counter b { color:#727786; }
.parameter-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-top:18px; padding:17px; border-radius:12px; background:#f8f8fb; }
.parameter-grid .field > span { display:flex; align-items:center; justify-content:space-between; }
.parameter-grid strong { color:var(--primary); font-size:11px; }
.range { appearance:none; height:5px !important; padding:0 !important; border:0 !important; border-radius:999px !important; background:#dddaf6 !important; box-shadow:none !important; }
.range::-webkit-slider-thumb { appearance:none; width:17px; height:17px; border:4px solid #fff; border-radius:50%; background:var(--primary); box-shadow:0 1px 5px rgba(0,0,0,.2); }
.parameter-row { margin-top:15px; }
.switch-row { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:16px; padding-top:16px; border-top:1px solid #f0f1f5; }
.switch-row > span { display:grid; gap:3px; }
.switch-row b { color:#5e6372; font-size:12px; }
.switch-row small { color:#999dab; font-size:10px; }
.switch-row input { position:absolute; opacity:0; pointer-events:none; }
.switch-row i { position:relative; flex:0 0 auto; width:39px; height:22px; border-radius:999px; background:#d9dce5; transition:.18s; }
.switch-row i::after { content:""; position:absolute; left:3px; top:3px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.2); transition:.18s; }
.switch-row input:checked + i { background:var(--primary); }
.switch-row input:checked + i::after { transform:translateX(17px); }
.info-list { display:grid; gap:0; }
.info-list div { display:flex; justify-content:space-between; gap:16px; padding:10px 0; border-bottom:1px solid #f0f1f5; font-size:11px; }
.info-list div:last-child { border-bottom:0; }
.info-list span { color:#9094a2; }
.info-list b { color:#565b6a; font-weight:650; text-align:right; }
.tag-list { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.tag { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:5px 8px; border-radius:7px; background:#f3f1ff; color:#6d5ff0; font-size:9px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }

.save-bar { position:fixed; left:0; right:0; bottom:0; z-index:35; padding:11px 0 calc(11px + env(safe-area-inset-bottom)); border-top:1px solid rgba(220,223,233,.9); background:rgba(255,255,255,.93); backdrop-filter:blur(16px); box-shadow:0 -8px 30px rgba(25,29,40,.05); }
.save-inner { width:min(1180px, calc(100% - 32px)); margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.save-status { display:flex; align-items:center; gap:8px; color:#8a8f9e; font-size:11px; }
.save-status.dirty { color:#7a6df1; }
.save-status.dirty i { background:#7a6df1; box-shadow:0 0 0 3px rgba(107,92,255,.1); }
.save-actions { display:flex; align-items:center; gap:7px; }
.toast-region { position:fixed; right:20px; top:82px; z-index:60; display:grid; gap:8px; width:min(360px, calc(100vw - 32px)); pointer-events:none; }
.toast { padding:12px 14px; border:1px solid var(--line); border-radius:11px; background:#fff; box-shadow:0 12px 30px rgba(20,24,36,.13); color:#555a68; font-size:12px; animation:toastIn .22s ease both; }
.toast.success { border-color:#d9eee5; color:#24795a; }
.toast.error { border-color:#f2dadd; color:#b33c48; }
@keyframes toastIn { from { opacity:0; transform:translateY(-6px); } }

@media (max-width: 860px) {
  .page-wrap { width:min(100% - 24px, 720px); margin-top:18px; }
  .editor-grid { grid-template-columns:1fr; }
  .agent-overview { align-items:flex-start; }
  .agent-overview > .secondary-button { display:none; }
  .copy-chip { max-width:220px; }
}

@media (max-width: 600px) {
  .topbar { height:60px; padding:0 14px; }
  .brand-subtitle, .api-pill { display:none; }
  .brand-title { font-size:14px; }
  .icon-only-mobile { width:38px; min-height:38px; padding:0; border:1px solid var(--line); border-radius:10px; }
  .icon-only-mobile .btn-text { display:none; }
  .page-wrap { width:calc(100% - 20px); margin:12px auto 110px; }
  .hero-card { padding:21px 17px; border-radius:17px; }
  .hero-copy h1 { font-size:23px; }
  .hero-copy p { font-size:12px; line-height:1.6; }
  .search-mode-switch { display:grid; width:100%; margin-top:18px; }
  .search-mode-option { min-height:40px; padding:0 10px; }
  .search-box { grid-template-columns:1fr; margin-top:10px; }
  .search-box .primary-button { height:44px; }
  .search-hint { display:none; }
  .results-panel { padding:15px; border-radius:15px; }
  .result-item { grid-template-columns:38px 1fr; }
  .result-avatar { width:38px; height:38px; }
  .result-open { display:none; }
  .agent-overview { padding:16px; border-radius:15px; }
  .avatar { width:45px; height:45px; border-radius:13px; }
  .agent-title-row { flex-wrap:wrap; }
  .agent-title-row h2 { width:100%; font-size:18px; }
  .meta-row { gap:6px 10px; }
  .copy-chip { width:100%; max-width:100%; text-align:left; }
  .config-card { border-radius:15px; }
  .card-header { padding:15px; grid-template-columns:31px 1fr auto; }
  .section-icon { width:31px; height:31px; }
  .card-content { padding:15px; }
  .form-grid.two, .parameter-grid { grid-template-columns:1fr; }
  .parameter-grid { gap:14px; padding:14px; }
  .field textarea { min-height:260px; }
  .save-inner { width:calc(100% - 20px); }
  .save-status { display:none; }
  .save-actions { width:100%; display:grid; grid-template-columns:.8fr 1.2fr; }
  .save-actions button { width:100%; }
  .toast-region { right:10px; top:70px; width:calc(100vw - 20px); }
}


/* End-user guidance */
.model-config-content { display:grid; gap:0; }
.parameter-help { display:block; margin-top:7px; color:#8d92a0; font-size:10.5px; line-height:1.55; font-weight:400; }
.parameter-help b { color:#666c7c; font-weight:700; }
.model-note { margin-top:16px; padding:11px 12px; border:1px solid #e7e4ff; border-radius:10px; background:#f8f7ff; color:#716b93; font-size:10.5px; line-height:1.55; }
.switch-row-first { margin-top:0; padding-top:0; border-top:0; }

/* Local chat history browser */
.chat-card { margin-top:16px; overflow:hidden; }
.chat-card-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 20px; }
.chat-card-title { display:flex; align-items:center; gap:11px; min-width:0; }
.chat-cache-status { padding:9px 20px; border-top:1px solid #f0f1f5; border-bottom:1px solid #f0f1f5; background:#fafafd; color:#888d9b; font-size:10.5px; }
.chat-cache-status.cache-warning { color:#a26818; background:#fffbf2; }
.chat-browser { display:grid; grid-template-columns:280px minmax(0,1fr); min-height:520px; }
.session-pane { border-right:1px solid #eef0f4; background:#fbfbfd; display:flex; flex-direction:column; min-width:0; }
.session-pane-head, .conversation-head { min-height:56px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 16px; border-bottom:1px solid #eef0f4; }
.session-pane-head b, .conversation-head b { color:#4f5564; font-size:12px; }
.session-pane-head span { color:#959aa8; font-size:10px; }
.session-list { flex:1; min-height:0; max-height:560px; overflow:auto; padding:8px; }
.session-item { width:100%; display:grid; gap:5px; padding:11px 12px; border:1px solid transparent; border-radius:10px; background:transparent; text-align:left; cursor:pointer; transition:.16s; }
.session-item:hover { background:#f4f3fb; }
.session-item.active { border-color:#ded9ff; background:#f2f0ff; }
.session-item b { color:#555b69; font-size:11px; font-weight:700; }
.session-item span { color:#979ba8; font-size:9.5px; }
.session-pagination { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:7px; padding:10px; border-top:1px solid #eef0f4; }
.session-pagination span { color:#8f94a2; font-size:9.5px; text-align:center; white-space:nowrap; }
.small-button { min-height:32px; padding:0 9px; font-size:10px; }
.conversation-pane { min-width:0; display:flex; flex-direction:column; background:#fff; }
.conversation-head > div { display:grid; gap:3px; min-width:0; }
.conversation-head small { color:#9a9eaa; font-size:9.5px; }
.message-list { flex:1; min-height:420px; max-height:620px; overflow:auto; padding:20px; background:linear-gradient(180deg,#fff 0%,#fcfcfe 100%); }
.message-row { display:flex; margin:0 0 13px; }
.message-row.user { justify-content:flex-end; }
.message-row.assistant, .message-row.tool { justify-content:flex-start; }
.message-bubble { max-width:min(76%,680px); padding:10px 12px; border:1px solid #e8eaf0; border-radius:14px 14px 14px 4px; background:#fff; box-shadow:0 4px 12px rgba(28,31,41,.025); }
.message-row.user .message-bubble { border-color:#ddd9ff; border-radius:14px 14px 4px 14px; background:#f0eeff; }
.message-row.tool .message-bubble { border-style:dashed; background:#fafafa; }
.message-role { margin-bottom:4px; color:#777c8b; font-size:9px; font-weight:800; }
.message-row.user .message-role { color:#6f62dc; }
.message-content { color:#454a57; font-size:12px; line-height:1.65; white-space:pre-wrap; word-break:break-word; }
.message-time { margin-top:6px; color:#a0a4b0; font-size:8.5px; }
.chat-empty { padding:30px 14px; color:#a0a4b1; font-size:11px; line-height:1.6; text-align:center; }
.chat-empty-large { display:grid; place-items:center; min-height:320px; }

@media (max-width: 860px) {
  .chat-browser { grid-template-columns:230px minmax(0,1fr); }
  .message-bubble { max-width:86%; }
}

@media (max-width: 600px) {
  .chat-card { margin-top:12px; }
  .chat-card-header { align-items:flex-start; padding:14px; }
  .chat-card-title { align-items:flex-start; }
  .chat-card-header .secondary-button { min-height:34px; padding:0 10px; white-space:nowrap; }
  .chat-cache-status { padding:8px 14px; line-height:1.45; }
  .chat-browser { display:block; min-height:0; }
  .session-pane { border-right:0; border-bottom:1px solid #eef0f4; }
  .session-list { display:flex; gap:7px; max-height:none; overflow-x:auto; overflow-y:hidden; padding:9px; scroll-snap-type:x proximity; }
  .session-item { flex:0 0 180px; scroll-snap-align:start; }
  .session-pagination { grid-template-columns:1fr auto 1fr; }
  .conversation-head { min-height:58px; padding:0 12px; }
  .message-list { min-height:360px; max-height:580px; padding:14px 10px; }
  .message-bubble { max-width:90%; padding:9px 11px; }
  .message-content { font-size:12px; }
  .parameter-help { font-size:10px; }
}

/* ===== 设备核验区块 ===== */
.verify-panel { margin-top: 16px; padding: 16px; border: 1px solid #e4e1ff; border-radius: var(--radius-sm); background: linear-gradient(180deg, #faf9ff, #fff); }
.verify-panel.hidden { display: none; }
.verify-head { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 12px; }
.verify-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--primary-soft); color: var(--primary); font-size: 17px; }
.verify-copy { display: grid; gap: 3px; min-width: 0; }
.verify-copy b { font-size: 14px; color: #303341; }
.verify-copy small { font-size: 12px; color: var(--muted); line-height: 1.55; }
.verify-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 13px; }
.verify-form input { width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; color: var(--text); font-size: 14px; letter-spacing: .06em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.verify-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(107, 92, 255, .12); }
.verify-form .primary-button { height: 42px; }
.verify-note { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.privacy-note { border-style: dashed !important; background: #fbfbfd !important; cursor: default; }
.privacy-note:hover { transform: none !important; border-color: var(--line) !important; background: #fbfbfd !important; }
.privacy-note .result-open { color: var(--muted) !important; }

@media (max-width: 600px) {
  .verify-panel { padding: 13px; }
  .verify-head { grid-template-columns: 32px 1fr; gap: 10px; }
  .verify-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 15px; }
  .verify-form { grid-template-columns: 1fr; }
  .verify-form .primary-button { width: 100%; }
}

/* ===== 审计日志管理页 ===== */
.hero-copy code { padding: 1px 6px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-strong); font-size: 12px; }

.audit-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 16px; }
.audit-filters .field { display: grid; gap: 6px; }
.audit-filters .field > span { font-size: 12px; color: var(--muted); }
.audit-filters input, .audit-filters select { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--text); font-size: 13px; }
.audit-filters input:focus, .audit-filters select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(107, 92, 255, .12); }

.audit-meta { margin-top: 12px; font-size: 12px; color: var(--muted); }

.audit-table-wrap { margin-top: 10px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.audit-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.audit-table thead th { position: sticky; top: 0; padding: 10px 12px; background: #fafbfd; border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 600; text-align: left; white-space: nowrap; }
.audit-table td { padding: 9px 12px; border-bottom: 1px solid #f2f3f7; vertical-align: top; }
.audit-table tbody tr:last-child td { border-bottom: none; }
.audit-table tbody tr:hover { background: #fbfbfe; }
.audit-time { white-space: nowrap; color: #4a4f5e; font-variant-numeric: tabular-nums; }
.audit-ip { white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #4a4f5e; }
.audit-table td:nth-child(4) b { display: block; color: #303341; }
.audit-table td:nth-child(4) small { display: block; margin-top: 2px; color: #a2a6b5; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10.5px; }
.audit-detail { min-width: 260px; color: #4a4f5e; line-height: 1.6; word-break: break-word; }

.audit-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; white-space: nowrap; border: 1px solid transparent; }
.audit-badge.ok { background: #e9f8f1; color: #0d8a5d; border-color: #cdeee0; }
.audit-badge.warn { background: #fff5e6; color: #b06a00; border-color: #ffe3bd; }
.audit-badge.bad { background: #fdecee; color: #c0333f; border-color: #f8d7db; }
.audit-badge.muted { background: #f3f4f8; color: #6d7282; border-color: #e7e9f0; }

.audit-empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 600px) {
  .audit-filters { grid-template-columns: 1fr; }
  .audit-table { font-size: 11.5px; }
  .audit-detail { min-width: 180px; }
}

/* ===== 主页面上的审计入口 ===== */
.audit-entry { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--muted); font-size: 12.5px; text-decoration: none; transition: .16s; }
.audit-entry:hover { border-color: #cac4ff; background: #faf9ff; color: var(--primary); }

/* ===== 管理员页令牌指令提示 ===== */
.admin-hint { margin-top: 14px; padding: 12px 14px; border: 1px dashed #ddd9f5; border-radius: var(--radius-sm); background: #fbfaff; font-size: 12px; line-height: 1.9; color: #5c6070; }
.admin-hint b { color: #303341; }
.admin-hint code { padding: 1px 6px; border-radius: 6px; background: #f0eeff; color: var(--primary-strong); font-size: 11.5px; white-space: nowrap; }

@media (max-width: 600px) {
  .audit-entry { height: 30px; padding: 0 9px; font-size: 11.5px; }
}
