/* app.css —— 三个面板共用样式（简洁深色，无外部依赖） */
* { box-sizing: border-box; }
body { margin: 0; font-family: "Microsoft YaHei", "Segoe UI", system-ui, sans-serif; background: #0f1420; color: #dbe3f0; }
a { color: #6ea8ff; }
.topbar { background: #161d2e; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #263248; }
.topbar h1 { font-size: 18px; margin: 0; color: #fff; }
.topbar .who { font-size: 13px; color: #9fb0cc; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 20px; }
.card { background: #161d2e; border: 1px solid #263248; border-radius: 10px; padding: 18px; margin-bottom: 18px; }
.card h2 { font-size: 15px; margin: 0 0 14px; color: #fff; border-left: 3px solid #6ea8ff; padding-left: 8px; }
label { display: block; font-size: 13px; margin: 8px 0 4px; color: #9fb0cc; }
input, select, textarea { width: 100%; padding: 9px 10px; background: #0f1420; border: 1px solid #2c3a54; border-radius: 6px; color: #dbe3f0; font-size: 14px; }
input:focus, select:focus { outline: none; border-color: #6ea8ff; }
button { background: #2563eb; color: #fff; border: none; padding: 9px 16px; border-radius: 6px; cursor: pointer; font-size: 14px; }
button:hover { background: #1d4ed8; }
button.ghost { background: #263248; }
button.danger { background: #b4433a; }
button.small { padding: 4px 10px; font-size: 12px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 140px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #263248; }
th { color: #9fb0cc; font-weight: normal; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag.active { background: #1e5c3a; color: #7ee2a8; }
.tag.unused { background: #3a4152; color: #b8c4dc; }
.tag.disabled, .tag.revoked { background: #5c2b28; color: #f0a59e; }
.msg { padding: 10px 12px; border-radius: 6px; margin: 10px 0; font-size: 13px; display: none; }
.msg.ok { background: #1e5c3a; color: #b6f0cf; display: block; }
.msg.err { background: #5c2b28; color: #f6c4bf; display: block; }
.login-box { max-width: 360px; margin: 80px auto; }
.hidden { display: none !important; }
.mono { font-family: Consolas, monospace; font-size: 12px; word-break: break-all; }
.hint { font-size: 12px; color: #7c8aa5; margin-top: 6px; }
/* 就地帮助气泡：功能旁的小“?”，悬停/聚焦弹出该功能的具体说明 */
.qh { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 5px; border-radius: 50%; background: #2c3a54; color: #9fb0cc; font-size: 11px; font-weight: bold; line-height: 1; cursor: help; user-select: none; vertical-align: middle; }
.qh:hover, .qh:focus { background: #2563eb; color: #fff; outline: none; }
.qh .qh-tip { position: absolute; left: 50%; bottom: calc(100% + 9px); transform: translateX(-50%); width: 250px; background: #0b1020; border: 1px solid #35507e; border-radius: 8px; padding: 9px 11px; color: #cdd6e6; font-size: 12px; font-weight: normal; line-height: 1.65; text-align: left; white-space: normal; box-shadow: 0 6px 22px rgba(0,0,0,.55); opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 1200; pointer-events: none; }
.qh:hover .qh-tip, .qh:focus .qh-tip { opacity: 1; visibility: visible; }
.qh .qh-tip::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #35507e; }
.qh.r .qh-tip { left: auto; right: -6px; transform: none; }
.qh.r .qh-tip::after { left: auto; right: 8px; transform: none; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: #0f1420; border: 1px solid #263248; border-radius: 8px; padding: 14px; text-align: center; }
.stat .n { font-size: 24px; color: #6ea8ff; font-weight: bold; }
.stat .t { font-size: 12px; color: #9fb0cc; margin-top: 4px; }
.home-links { display: flex; gap: 16px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.home-links a { display: block; padding: 24px 32px; background: #161d2e; border: 1px solid #263248; border-radius: 10px; text-decoration: none; color: #dbe3f0; text-align: center; min-width: 180px; }
.home-links a:hover { border-color: #6ea8ff; }
.home-links .big { font-size: 18px; color: #fff; margin-bottom: 6px; }
/* 人机验证（PoW 复选框式） */
.cap { margin: 12px 0 4px; }
.cap-box { display: flex; align-items: center; gap: 10px; max-width: 300px; padding: 10px 12px; background: #0f1420; border: 1px solid #2c3a54; border-radius: 6px; cursor: pointer; user-select: none; }
.cap-box:hover { border-color: #6ea8ff; }
.cap-ck { width: 20px; height: 20px; flex: 0 0 auto; border: 2px solid #6ea8ff; border-radius: 4px; text-align: center; line-height: 18px; color: #fff; font-weight: bold; }
.cap-box.doing .cap-ck { border-color: #d9b45a; }
.cap-box.ok { border-color: #1e7a48; cursor: default; }
.cap-box.ok .cap-ck { border-color: #1e7a48; background: #1e5c3a; }
.cap-tx { font-size: 13px; color: #9fb0cc; }
.cap-box.ok .cap-tx { color: #7ee2a8; }
/* 侧边栏后台布局 */
.app-layout { display: flex; min-height: calc(100vh - 49px); }
.sidebar { width: 200px; flex: 0 0 200px; background: #141b2b; border-right: 1px solid #263248; padding: 10px 0; }
.side-item { display: flex; align-items: center; gap: 11px; padding: 11px 18px; color: #b8c4dc; text-decoration: none; font-size: 14px; cursor: pointer; border-left: 3px solid transparent; user-select: none; }
.side-item:hover { background: #1b2438; color: #fff; }
.side-item.active { background: #1e2942; color: #fff; border-left-color: #2563eb; }
.side-item.logout { color: #f0a59e; margin-top: 24px; }
.side-item .ic { width: 17px; height: 17px; flex: 0 0 auto; opacity: .8; }
.side-item:hover .ic, .side-item.active .ic { opacity: 1; }
.content-area { flex: 1; padding: 18px 22px; overflow: auto; }
.crumb { color: #9fb0cc; font-size: 13px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #263248; }
.crumb .app-pick { float: right; color: #9fb0cc; }
.crumb select { width: auto; display: inline-block; padding: 4px 8px; }
.page { display: none; }
.page.active { display: block; }
/* 复制行 + 复选框标签对齐 */
.copyrow { display: flex; gap: 8px; align-items: flex-start; margin-top: 4px; }
.copyrow input, .copyrow textarea { flex: 1; }
.copyrow > button { flex: 0 0 auto; }
label.ck { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
label.ck input[type="checkbox"] { width: auto; margin: 0; }
/* 公告弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #161d2e; border: 1px solid #263248; border-radius: 10px; padding: 20px; width: 480px; max-width: 90%; max-height: 80vh; overflow: auto; }
.notice-item { border-bottom: 1px solid #263248; padding: 10px 0; }
.notice-item h4 { margin: 0 0 6px; color: #fff; }
.notice-item .t { font-size: 12px; color: #7c8aa5; margin-top: 4px; }
/* 多选应用复选框组 */
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.checks input[type="checkbox"] { width: auto; margin: 0; }
/* 自研弹窗 */
.modal.dlg { width: 400px; }
.dlg-t { margin: 0 0 10px; color: #fff; font-size: 16px; }
.dlg-msg { color: #cdd6e6; white-space: pre-wrap; line-height: 1.6; word-break: break-word; }
.dlg-input { width: 100%; margin-top: 12px; }
.dlg-btns { margin-top: 16px; text-align: right; }
/* 单卡详情弹窗 */
.carddlg { width: 520px; }
.cd-grid { margin-bottom: 6px; }
.cd-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #1a2236; }
.cd-row > label:first-child { flex: 0 0 118px; text-align: right; color: #8b97ad; font-size: 13px; }
.cd-row .cd-val { flex: 1; color: #e6ecf5; word-break: break-all; }
.cd-row > input[type="number"], .cd-row > input[type="text"] { flex: 1; }
.cd-edit { margin-top: 8px; border-top: 1px dashed #263248; padding-top: 8px; }
/* 顶部通知条 toast：从顶端下滑出现、上滑消失 */
.nv-toast { position: fixed; top: 0; left: 50%; transform: translate(-50%, -130%); z-index: 4000; padding: 12px 22px; border-radius: 0 0 10px 10px; font-size: 14px; font-weight: 500; text-align: center; max-width: 82%; box-shadow: 0 8px 26px rgba(0,0,0,.5); transition: transform .34s cubic-bezier(.2,.85,.25,1); pointer-events: none; }
.nv-toast.show { transform: translate(-50%, 0); }
.nv-toast.ok { background: #1e5c3a; color: #d6ffe8; border: 1px solid #2c7a52; border-top: none; }
.nv-toast.err { background: #7a322c; color: #ffdad4; border: 1px solid #a4433a; border-top: none; }

/* API 对照表:命令一行不换行,容器限高,滚动条常驻可视区 */
.api-scroll { overflow: auto; max-height: 70vh; }
.api-scroll table { min-width: 1400px; width: auto; }
.api-scroll thead th { position: sticky; top: 0; z-index: 2; background: #161d2e; box-shadow: 0 1px 0 #263248; }
.api-scroll th, .api-scroll td { white-space: nowrap; }
.api-scroll td.wrap { white-space: normal; word-break: normal; overflow-wrap: break-word; min-width: 300px; }
.api-scroll::-webkit-scrollbar { height: 12px; width: 12px; }
.api-scroll::-webkit-scrollbar-track { background: #0f1420; }
.api-scroll::-webkit-scrollbar-thumb { background: #3a4a6b; border-radius: 6px; }
.api-scroll::-webkit-scrollbar-thumb:hover { background: #4d5f8a; }
