/* 极光页面基础（040 · 10-26，《排查-登录页管理后台知识库对照极光标准》）：登录、平台运维后台、知识库共用。
   颜色、字体、阴影直接取 One（one/one.css）的变量和数值；字体一律 MiSans（页面先引 /fonts/misans/misans.css）。
   状态只用小圆点 + 字；提示是石墨灰；不用紫色、墨绿、渐变大字和英文大写小标题。 */
:root {
  --ink: #0E1B2A; --body: #253545; --sec: #4A5B6B; --muted: #5E6F7E; --faint: #7A8B98;
  --line: #D3DCE0; --line-2: #E1E8EB; --line-3: #EDF2F4; --soft: #F2F6F7; --soft-2: #F5F8F9;
  --cyan: #53BFD5; --cyan-ring: rgba(83,191,213,.18); --teal: #0F6E85; --teal-h: #0B5568; --teal-soft: #EAF4F7;
  --navy: #13253D; --navy-h: #1E3654;
  --amber: #B4570A; --amber-ink: #7A4206; --amber-soft: #FBF1E6; --red: #8E2219; --red-soft: #FBEDEB;
  --dot-info: #3BA9C1; --dot-ok: #2F9E6B; --dot-warn: #E0904A; --dot-err: #D5604F; --dot-off: #B5C1C9;
  --graphite: rgba(58,65,72,.80); --graphite-solid: #3A4148;
  --font: "MiSans", "MiSans VF", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "MiSans", "MiSans VF", "PingFang SC", "Microsoft YaHei", sans-serif;
  --code: ui-monospace, SFMono-Regular, Menlo, monospace;
  --sh-menu: 0 12px 32px rgba(10,29,53,.12), 0 2px 6px rgba(10,29,53,.05);
  --sh-panel: -12px 0 32px rgba(10,29,53,.08);
  --sh-toast: 0 10px 30px rgba(20,24,28,.22);
  /* 只在 CSS 里画的图标（遮罩），图形和 one/icons.js 同一张表，由 iconMaskUrl() 生成 */
  --ab-i-eye: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M2.5%2012s3.5-6.5%209.5-6.5%209.5%206.5%209.5%206.5-3.5%206.5-9.5%206.5S2.5%2012%202.5%2012z%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%2F%3E%3C%2Fsvg%3E");
  --ab-i-alert: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M12%207.8v5M12%2016.2v.01%22%2F%3E%3C%2Fsvg%3E");
  --ab-i-info: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M12%2011v5M12%207.8v.01%22%2F%3E%3C%2Fsvg%3E");
  --ab-i-check-circle: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M8.5%2012.3l2.4%202.4%204.6-4.9%22%2F%3E%3C%2Fsvg%3E");
  --ab-i-chevron-right: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%206l6%206-6%206%22%2F%3E%3C%2Fsvg%3E");
  --ab-i-external: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7%2017L17%207M9%207h8v8%22%2F%3E%3C%2Fsvg%3E");
  --ab-i-close: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%206l12%2012M18%206L6%2018%22%2F%3E%3C%2Fsvg%3E");
}
.ab { font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased; }
.ab :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ab :focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ab :is(.ab-input, .ab-select, .ab-textarea):focus-visible { outline: none; }
.ab [hidden] { display: none !important; }
.ab-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ab-num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ab svg.ic { flex: none; }

/* 按钮：一个页面一个主按钮（深蓝实底白字）；危险操作是次按钮加红字 */
.ab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; text-decoration: none; transition: background .14s ease, border-color .14s ease, color .14s ease; }
.ab-btn:hover:not(:disabled) { border-color: #B9C6CC; background: var(--soft-2); }
.ab-btn.is-primary { border-color: var(--navy); background: var(--navy); color: #FFFFFF; }
.ab-btn.is-primary:hover:not(:disabled) { border-color: var(--navy-h); background: var(--navy-h); }
.ab-btn.is-quiet { border-color: transparent; background: transparent; color: var(--sec); padding: 0 8px; }
.ab-btn.is-quiet:hover:not(:disabled) { background: var(--soft); color: var(--ink); }
.ab-btn.is-danger { color: var(--red); }
.ab-btn.is-sm { height: 30px; padding: 0 10px; border-radius: 7px; font-size: 13px; }
.ab-btn.is-block { width: 100%; height: 44px; border-radius: 10px; font-size: 15px; }
.ab-btn:disabled { cursor: not-allowed; opacity: .55; }
.ab-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--sec); cursor: pointer; }
.ab-icon-btn:hover { background: var(--soft); color: var(--ink); }
.ab-link { color: var(--teal); font-weight: 500; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.ab-link:hover { color: var(--teal-h); text-decoration: underline; text-underline-offset: 3px; }

/* 输入框：默认 / 聚焦（青光圈）/ 出错（提交后才出现）/ 不能改 */
.ab-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.ab-field > span, .ab-field > legend { font-size: 13px; font-weight: 500; color: var(--body); }
.ab-input, .ab-select, .ab-textarea { box-sizing: border-box; width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #FFFFFF; color: var(--ink); font-size: 14px; outline: none; transition: border-color .14s ease, box-shadow .14s ease; }
.ab-textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.ab-input::placeholder, .ab-textarea::placeholder { color: var(--faint); }
.ab-input:focus, .ab-select:focus, .ab-textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-ring); }
.ab-input[aria-invalid="true"], .ab-input:user-invalid { border-color: var(--dot-err); }
.ab-input:disabled, .ab-select:disabled { background: var(--soft-2); color: var(--muted); }
.ab-select { appearance: none; padding-right: 32px; background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235E6F7E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.ab-err { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13px; line-height: 1.5; color: var(--red); }
.ab-hint { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.ab-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--body); cursor: pointer; }
.ab-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--navy); }

/* 分段、页签 */
.ab-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--soft); }
.ab-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--sec); font-size: 13px; white-space: nowrap; cursor: pointer; }
.ab-seg button[aria-pressed="true"], .ab-seg button.is-on { background: #FFFFFF; color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(10,29,53,.08); }
.ab-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.ab-tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 0 10px; border: 0; background: transparent; color: var(--sec); font-size: 14px; cursor: pointer; }
.ab-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--navy); }
.ab-tabs em { font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--muted); font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* 状态：一个小圆点 + 字 */
.ab-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--body); white-space: nowrap; }
.ab-dot::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--dot-info); }
.ab-dot.is-ok::before { background: var(--dot-ok); } .ab-dot.is-warn::before { background: var(--dot-warn); }
.ab-dot.is-err::before { background: var(--dot-err); } .ab-dot.is-off::before { background: var(--dot-off); }
.ab-dot.is-off { color: var(--muted); }
.ab-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--soft); color: var(--body); font-size: 12px; white-space: nowrap; }

/* 开关：开着是青，不用绿色 */
.ab-switch { position: relative; display: inline-block; width: 32px; height: 18px; flex: none; padding: 0; border: 0; border-radius: 9px; background: var(--line); cursor: pointer; transition: background .15s ease; }
.ab-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(10,29,53,.25); transition: transform .15s ease; }
.ab-switch[aria-checked="true"] { background: var(--teal); }
.ab-switch[aria-checked="true"]::after { transform: translateX(14px); }

/* 卡片、说明、表格 */
.ab-card { border: 1px solid var(--line-2); border-radius: 12px; background: #FFFFFF; overflow: hidden; }
.ab-card > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-3); }
.ab-card > header h2, .ab-card > header h3 { margin: 0; font-size: 15px; font-weight: 600; }
.ab-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--soft-2); color: var(--body); font-size: 13px; line-height: 1.6; }
.ab-note > svg { margin-top: 3px; color: var(--sec); }
.ab-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ab-table th { padding: 9px 14px; border-bottom: 1px solid #E6EBEE; background: var(--soft-2); color: var(--muted); font-size: 12.5px; font-weight: 500; text-align: left; white-space: nowrap; }
.ab-table td { padding: 11px 14px; border-bottom: 1px solid var(--line-3); color: var(--body); vertical-align: middle; }
.ab-table tr:last-child td { border-bottom: 0; }
.ab-table tbody tr:hover { background: #FAFCFC; }
.ab-table .is-num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ab-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 24px; text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.ab-empty b { color: var(--ink); font-size: 15px; font-weight: 600; }
.ab-empty .ab-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--soft); color: var(--sec); }

/* 菜单、右侧面板 */
.ab-menu { position: absolute; z-index: 40; min-width: 180px; padding: 6px; border: 1px solid var(--line-2); border-radius: 12px; background: #FFFFFF; box-shadow: var(--sh-menu); display: flex; flex-direction: column; animation: ab-in .14s ease; }
.ab-menu button { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--body); font-size: 14px; text-align: left; cursor: pointer; }
.ab-menu button:hover { background: var(--soft); }
.ab-menu button.is-danger { color: var(--red); }
.ab-menu hr { margin: 4px 2px; border: 0; border-top: 1px solid var(--line-3); }
.ab-drawer { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); display: flex; flex-direction: column; border-left: 1px solid var(--line-2); background: #FFFFFF; box-shadow: var(--sh-panel); animation: ab-drawer-in .2s ease; }
.ab-drawer > header { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line-3); }
.ab-drawer > header h2 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.ab-drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 24px; }
.ab-drawer-foot { flex: none; border-top: 1px solid var(--line-2); padding: 16px 24px 18px; background: #FFFFFF; }
.ab-scrim { position: fixed; z-index: 49; inset: 0; background: rgba(14,27,42,.06); }
@keyframes ab-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes ab-drawer-in { from { opacity: .4; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* 提示：石墨灰，顶部居中；和 One 同一套 */
.ab-toast { position: fixed; z-index: 60; top: 18px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; max-width: min(520px, calc(100vw - 32px)); margin: 0; padding: 9px 14px; border: 0; border-radius: 10px; background: var(--graphite); color: #F3F5F6; font-size: 13px; line-height: 1.5; box-shadow: var(--sh-toast); -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3); animation: ab-in .16s ease; }
.ab-toast::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--dot-ok); }
.ab-toast.is-warn::before { background: var(--dot-warn); } .ab-toast.is-err::before { background: var(--dot-err); } .ab-toast.is-info::before { background: var(--dot-info); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .ab-toast { background: var(--graphite-solid); } }

@media (prefers-reduced-motion: reduce) { .ab-menu, .ab-drawer, .ab-toast { animation: none; } }
@media (hover: none) { .ab-btn.is-sm { height: 32px; } .ab-icon-btn { width: 32px; height: 32px; } }

/* 遮罩图标：颜色跟着文字走 */
.ab-mask { display: inline-block; width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask: var(--ab-mask) center / contain no-repeat; mask: var(--ab-mask) center / contain no-repeat; }
