/* ============================================================
   AINative v0.3.0 · 系统设置 / 三级页面 / 指令台 样式
   与主看板同一套深色霓虹风格（#0c1219 底 + 橙/青霓虹描边）
   ============================================================ */

/* ---------- 通用遮罩 ---------- */
.set-mask, .console-mask, .confirms-mask, .page-form-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(3, 6, 10, .68);
  backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center;
}
.set-mask.open, .console-mask.open, .confirms-mask.open, .page-form-mask.open {
  display: flex; animation: maskIn .18s ease both;
}
@keyframes maskIn { from { opacity: 0 } to { opacity: 1 } }

/* ---------- 顶栏入口按钮 ---------- */
.top-btn {
  border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04);
  color: #9dabbb; padding: 5px 10px; border-radius: 7px; font-size: 11px;
  cursor: pointer; transition: .16s; position: relative; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.top-btn:hover {
  color: #eef3f8; border-color: rgba(45, 226, 230, .5);
  background: rgba(45, 226, 230, .1); box-shadow: 0 0 12px rgba(45, 226, 230, .18);
}
.top-btn svg { width: 13px; height: 13px; display: block; }
.top-btn .tb-badge {
  background: #f97356; color: #fff; font-size: 9px; min-width: 15px; height: 15px;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px; font-weight: 700; line-height: 1;
}
.top-btn.pulse { animation: tbPulse 2.4s ease-in-out infinite; }
@keyframes tbPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(249, 115, 86, 0) }
  50% { box-shadow: 0 0 14px rgba(249, 115, 86, .5) }
}

/* ---------- 系统设置面板 ---------- */
.set-panel {
  width: min(1080px, 94vw); height: min(760px, 92vh);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 30%), #0d141d;
  border: 1px solid rgba(45, 226, 230, .22); border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
  display: flex; flex-direction: column; overflow: hidden;
  animation: setIn .2s ease both;
}
@keyframes setIn { from { opacity: 0; transform: translateY(14px) scale(.985) } to { opacity: 1; transform: none } }

.set-head {
  display: flex; align-items: center; gap: 11px; padding: 14px 18px;
  border-bottom: 1px solid #1b2530; flex: 0 0 auto;
}
.set-head .set-ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 26%, #ffb169, #f06a24 62%, #9c3808);
  box-shadow: 0 0 14px rgba(255, 122, 41, .4);
}
.set-head .set-ico svg { width: 16px; height: 16px; color: #fff; }
.set-head h2 { margin: 0; font-size: 13.5px; font-weight: 600; color: #eef3f8; }
.set-head .set-h-sub { font-size: 9.5px; color: #5c6b7d; margin-top: 2px; }
.set-head .set-close {
  margin-left: auto; background: transparent; border: none; color: #8d9bad;
  font-size: 19px; line-height: 1; cursor: pointer; padding: 3px 7px; border-radius: 5px;
}
.set-head .set-close:hover { color: #eef3f8; background: rgba(255, 255, 255, .07); }

.set-body { display: flex; flex: 1 1 auto; min-height: 0; }

.set-tabs {
  width: 208px; flex: 0 0 208px; border-right: 1px solid #1b2530;
  padding: 10px; overflow-y: auto; background: rgba(255, 255, 255, .012);
}
.set-tab {
  display: block; width: 100%; text-align: left; border: 1px solid transparent;
  background: transparent; color: #8d9bad; border-radius: 9px;
  padding: 9px 11px; margin-bottom: 4px; cursor: pointer; transition: .16s;
  position: relative;
}
.set-tab:hover { background: rgba(255, 255, 255, .04); color: #dfe8f2; }
.set-tab.active {
  border-color: rgba(255, 122, 41, .42);
  background: linear-gradient(180deg, rgba(255, 122, 41, .16), rgba(255, 122, 41, .05));
  color: #ffd0a8;
}
.set-tab b { display: block; font-size: 12px; font-weight: 600; }
.set-tab span { display: block; font-size: 9.5px; color: #5c6b7d; margin-top: 3px; line-height: 1.45; }
.set-tab.active span { color: #a58b74; }
.set-badge {
  position: absolute; right: 9px; top: 9px; font-size: 9px; min-width: 16px; height: 16px;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px; font-weight: 700;
}
.set-badge.warn { background: rgba(249, 115, 86, .18); color: #ff9d90; border: 1px solid rgba(249, 115, 86, .4); }

.set-content { flex: 1 1 auto; overflow-y: auto; padding: 18px 20px; min-width: 0; }
.set-content::-webkit-scrollbar { width: 8px; }
.set-content::-webkit-scrollbar-thumb { background: #1d2a37; border-radius: 8px; }
.set-loading, .set-err { padding: 30px; text-align: center; color: #5c6b7d; font-size: 12px; }
.set-err { color: #ff9d90; }
.set-group-desc {
  font-size: 11px; color: #8d9bad; line-height: 1.7; margin-bottom: 15px;
  padding: 9px 12px; background: rgba(45, 226, 230, .05);
  border-left: 2px solid rgba(45, 226, 230, .4); border-radius: 0 7px 7px 0;
}

.set-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 11px; }
.set-field {
  background: rgba(255, 255, 255, .022); border: 1px solid var(--line, rgba(255, 255, 255, .075));
  border-radius: 9px; padding: 10px 12px;
}
.set-field.secret { border-color: rgba(245, 165, 36, .28); background: rgba(245, 165, 36, .04); }
.set-field > label {
  display: block; font-size: 11px; color: #dce6f0; font-weight: 500; margin-bottom: 6px;
}
.set-field > label em {
  font-style: normal; font-size: 8.5px; color: #f5a524; border: 1px solid rgba(245, 165, 36, .35);
  border-radius: 3px; padding: 0 4px; margin-left: 4px; vertical-align: middle;
}
.set-ctl { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.set-in {
  flex: 1 1 auto; min-width: 0; background: #0a1017; border: 1px solid #23303d;
  color: #eef3f8; border-radius: 6px; padding: 6px 9px; font-size: 11.5px;
  font-family: inherit; transition: .16s;
}
.set-in:focus { outline: none; border-color: rgba(45, 226, 230, .55); box-shadow: 0 0 10px rgba(45, 226, 230, .16); }
select.set-in { cursor: pointer; }
.set-st { font-size: 9.5px; white-space: nowrap; }
.set-st.on { color: #5fe0a8; }
.set-st.off { color: #5c6b7d; }
.set-hint { display: block; font-size: 9.5px; color: #5c6b7d; margin-top: 5px; line-height: 1.5; }

.set-switch { position: relative; display: inline-block; width: 38px; height: 20px; cursor: pointer; }
.set-switch input { opacity: 0; width: 0; height: 0; }
.set-switch span {
  position: absolute; inset: 0; background: #1a2431; border-radius: 999px;
  transition: .2s; border: 1px solid #26323f;
}
.set-switch span::before {
  content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px;
  background: #5c6b7d; border-radius: 50%; transition: .2s;
}
.set-switch input:checked + span { background: rgba(45, 226, 230, .22); border-color: rgba(45, 226, 230, .5); }
.set-switch input:checked + span::before { transform: translateX(18px); background: #2de2e6; box-shadow: 0 0 8px #2de2e6; }

.set-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.set-btn {
  border: 1px solid rgba(45, 226, 230, .34); background: rgba(45, 226, 230, .08);
  color: #7fe6ef; padding: 7px 14px; border-radius: 7px; font-size: 11.5px; cursor: pointer;
  transition: .16s; font-family: inherit;
}
.set-btn:hover { background: rgba(45, 226, 230, .18); border-color: rgba(45, 226, 230, .6); color: #b6f5fb; }
.set-btn.danger { border-color: rgba(249, 115, 86, .4); background: rgba(249, 115, 86, .09); color: #ff9d90; }
.set-btn.danger:hover { background: rgba(249, 115, 86, .2); border-color: rgba(249, 115, 86, .7); }
.set-mini {
  border: 1px solid #26323f; background: rgba(255, 255, 255, .04); color: #9dabbb;
  padding: 2px 8px; border-radius: 5px; font-size: 10px; cursor: pointer; transition: .16s;
}
.set-mini:hover { color: #eef3f8; border-color: rgba(45, 226, 230, .45); background: rgba(45, 226, 230, .1); }
.set-mini.danger:hover { color: #ff9d90; border-color: rgba(249, 115, 86, .5); background: rgba(249, 115, 86, .12); }

/* 模型配置表 */
.set-model-table {
  margin-bottom: 16px; border: 1px solid var(--line, rgba(255, 255, 255, .075));
  border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .015);
}
.set-mt-head {
  display: flex; align-items: center; gap: 9px; padding: 9px 13px;
  border-bottom: 1px solid #1b2530; background: rgba(255, 255, 255, .02);
}
.set-mt-head b { font-size: 11.5px; color: #eef3f8; }
.set-mt-head span { font-size: 9.5px; color: #5c6b7d; margin-left: auto; }
.set-mt-scroll { overflow-x: auto; }
.set-mt { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.set-mt th {
  text-align: left; padding: 7px 10px; color: #5c6b7d; font-weight: 500;
  font-size: 9.5px; letter-spacing: .06em; border-bottom: 1px solid #1b2530; white-space: nowrap;
}
.set-mt td { padding: 6px 10px; border-bottom: 1px solid rgba(255, 255, 255, .04); color: #c9d6e3; vertical-align: middle; }
.set-mt tr:hover td { background: rgba(255, 255, 255, .022); }
.set-mt .set-in { padding: 4px 7px; font-size: 10.5px; }
.set-mt-ops { white-space: nowrap; }
.set-mt-ops .set-mini { margin-right: 4px; }
.set-def {
  font-size: 8.5px; color: #5fe0a8; border: 1px solid rgba(55, 221, 134, .35);
  background: rgba(55, 221, 134, .1); border-radius: 3px; padding: 0 4px; margin-left: 5px;
}
.set-reuse {
  font-size: 8.5px; color: #7fe6ef; border: 1px solid rgba(45, 226, 230, .32);
  background: rgba(45, 226, 230, .08); border-radius: 3px; padding: 0 4px; margin-left: 4px;
}
.set-mt-foot { display: flex; gap: 8px; padding: 10px 13px; border-top: 1px solid #1b2530; flex-wrap: wrap; }

/* ---------- 三级页面 ---------- */
.page-wrap {
  position: absolute; inset: 0; overflow-y: auto; padding: 16px 20px 24px;
  background: radial-gradient(ellipse 50% 40% at 50% 0%, rgba(24, 52, 74, .22), transparent 70%), #070b11;
}
.page-wrap::-webkit-scrollbar { width: 8px; }
.page-wrap::-webkit-scrollbar-thumb { background: #1d2a37; border-radius: 8px; }

.pg-head { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; flex-wrap: wrap; }
.pg-ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, #ff7a29) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #ff7a29) 40%, transparent);
  color: var(--accent, #ff7a29); flex: 0 0 auto;
}
.pg-ico svg { width: 19px; height: 19px; }
.pg-title h1 { margin: 0; font-size: 17px; font-weight: 600; color: #eef3f8; }
.pg-title p { margin: 3px 0 0; font-size: 10.5px; color: #8d9bad; }
.pg-actions { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.pg-btn {
  border: 1px solid color-mix(in srgb, var(--accent, #ff7a29) 42%, transparent);
  background: color-mix(in srgb, var(--accent, #ff7a29) 12%, transparent);
  color: color-mix(in srgb, var(--accent, #ff7a29) 85%, #fff);
  padding: 6px 13px; border-radius: 7px; font-size: 11.5px; cursor: pointer;
  transition: .16s; font-family: inherit; white-space: nowrap;
}
.pg-btn:hover {
  background: color-mix(in srgb, var(--accent, #ff7a29) 24%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent, #ff7a29) 26%, transparent);
}
.pg-btn.ghost {
  border-color: #26323f; background: rgba(255, 255, 255, .035); color: #9dabbb;
}
.pg-btn.ghost:hover { color: #eef3f8; border-color: rgba(45, 226, 230, .45); background: rgba(45, 226, 230, .08); }
.pg-btn.small { padding: 4px 10px; font-size: 10.5px; }

.pg-kpis { display: flex; gap: 10px; margin-bottom: 13px; flex-wrap: wrap; }
.pg-kpi {
  background: linear-gradient(180deg, rgba(255, 255, 255, .028), transparent 60%), #111823;
  border: 1px solid var(--line, rgba(255, 255, 255, .075)); border-radius: 10px;
  padding: 10px 15px; min-width: 96px;
}
.pg-kpi b {
  display: block; font-size: 19px; font-weight: 700; color: var(--accent, #ff7a29);
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.pg-kpi span { display: block; font-size: 9.5px; color: #5c6b7d; margin-top: 3px; }

.pg-toolbar { display: flex; gap: 8px; margin-bottom: 11px; flex-wrap: wrap; align-items: center; }
.pg-in {
  background: #0a1017; border: 1px solid #23303d; color: #eef3f8;
  border-radius: 7px; padding: 6px 10px; font-size: 11.5px; font-family: inherit;
  min-width: 130px; transition: .16s;
}
.pg-in:focus { outline: none; border-color: rgba(45, 226, 230, .5); }

.pg-body { background: var(--panel, #111823); border: 1px solid var(--line, rgba(255, 255, 255, .075)); border-radius: 11px; overflow: hidden; overflow-x: auto; }
.pg-tbl { width: 100%; border-collapse: collapse; font-size: 11px; min-width: 640px; }
.pg-tbl th {
  text-align: left; padding: 9px 12px; color: #5c6b7d; font-weight: 500; font-size: 9.5px;
  letter-spacing: .06em; border-bottom: 1px solid #1b2530; background: rgba(255, 255, 255, .018);
  position: sticky; top: 0; backdrop-filter: blur(4px); white-space: nowrap;
}
.pg-tbl td { padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, .035); color: #c9d6e3; }
.pg-tbl tbody tr:hover td { background: rgba(255, 255, 255, .022); }
.pg-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.pg-tag {
  font-size: 9.5px; padding: 2px 7px; border-radius: 5px; white-space: nowrap;
  background: color-mix(in srgb, var(--accent, #ff7a29) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #ff7a29) 26%, transparent);
  color: color-mix(in srgb, var(--accent, #ff7a29) 88%, #fff);
}
.pg-tag.on { background: rgba(55, 221, 134, .14); border-color: rgba(55, 221, 134, .35); color: #5fe0a8; }
.pg-tag.off { background: rgba(255, 255, 255, .04); border-color: #26323f; color: #5c6b7d; }
.pg-mini {
  border: 1px solid #26323f; background: rgba(255, 255, 255, .04); color: #9dabbb;
  padding: 2px 8px; border-radius: 5px; font-size: 10px; cursor: pointer; transition: .16s; margin-left: 4px;
}
.pg-mini:hover { color: #eef3f8; border-color: rgba(45, 226, 230, .45); }
.pg-mini.danger:hover { color: #ff9d90; border-color: rgba(249, 115, 86, .5); background: rgba(249, 115, 86, .1); }
.pg-inline {
  background: #0a1017; border: 1px solid #23303d; color: #eef3f8; border-radius: 5px;
  padding: 2px 6px; font-size: 10.5px; font-family: inherit; cursor: pointer;
}
.pg-inline:focus { outline: none; border-color: rgba(45, 226, 230, .5); }

/* 日历 */
.pg-cal { border-bottom: 1px solid #1b2530; }
.pg-cal-head {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
  background: #1b2530; border-bottom: 1px solid #1b2530;
}
.pg-cal-head span {
  padding: 7px; text-align: center; font-size: 9.5px; color: #5c6b7d; background: #0d141d;
}
.pg-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: #1b2530; }
.pg-cal-cell {
  background: #0d141d; min-height: 62px; padding: 5px 6px; font-size: 10px; color: #5c6b7d;
}
.pg-cal-cell.blank { background: #0a1017; }
.pg-cal-cell b { display: block; font-size: 10.5px; color: #8d9bad; margin-bottom: 3px; font-weight: 500; }
.pg-cal-cell.has { background: rgba(45, 226, 230, .045); }
.pg-cal-cell.has b { color: #2de2e6; }
.pg-cal-cell.today { box-shadow: inset 0 0 0 1px rgba(255, 122, 41, .5); }
.pg-cal-cell.today b { color: #ff7a29; }
.pg-cal-item {
  display: block; font-size: 9.5px; color: #c9d6e3; background: rgba(45, 226, 230, .1);
  border-left: 2px solid #2de2e6; padding: 1px 4px; margin-bottom: 2px;
  border-radius: 0 3px 3px 0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pg-cal-item:hover { background: rgba(45, 226, 230, .2); }
.pg-cal-more { font-size: 9px; color: #5c6b7d; }
.pg-cal-list { padding: 12px 14px; }
.pg-cal-list h3 { margin: 0 0 9px; font-size: 11.5px; color: #dce6f0; font-weight: 600; }
.pg-cal-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .04); font-size: 11px;
}
.pg-cal-time { color: #5c6b7d; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 10px; }
.pg-cal-title { color: #dce6f0; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-cal-loc { color: #5c6b7d; font-size: 10px; white-space: nowrap; }

/* 表单弹窗 */
.pf-card {
  width: min(680px, 94vw); max-height: 88vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 30%), #0d141d;
  border: 1px solid rgba(45, 226, 230, .22); border-radius: 13px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .7); animation: setIn .18s ease both;
}
.pf-card::-webkit-scrollbar { width: 8px; }
.pf-card::-webkit-scrollbar-thumb { background: #1d2a37; border-radius: 8px; }
.pf-title {
  padding: 13px 17px; border-bottom: 1px solid #1b2530; font-size: 12.5px;
  color: #eef3f8; font-weight: 600;
}
.pf-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 11px; padding: 16px 17px;
}
.pf-wide { grid-column: 1 / -1; }
.pf span { display: block; font-size: 10.5px; color: #8d9bad; margin-bottom: 5px; }
.pf span em { color: #f97356; font-style: normal; }
.pf input, .pf select, .pf textarea {
  width: 100%; background: #0a1017; border: 1px solid #23303d; color: #eef3f8;
  border-radius: 6px; padding: 7px 9px; font-size: 11.5px; font-family: inherit; transition: .16s;
}
.pf textarea { resize: vertical; line-height: 1.6; }
.pf input:focus, .pf select:focus, .pf textarea:focus {
  outline: none; border-color: rgba(45, 226, 230, .55); box-shadow: 0 0 10px rgba(45, 226, 230, .14);
}
.pf-tip {
  background: rgba(255, 255, 255, .03); border: 1px solid #1e2a38; border-radius: 6px;
  padding: 8px 10px; font-size: 10.5px; color: #8d9bad; line-height: 1.6;
}
.pf-err {
  margin: 0 17px; font-size: 11px; color: #ff9d90; padding: 7px 10px;
  background: rgba(249, 115, 86, .08); border: 1px solid rgba(249, 115, 86, .25); border-radius: 6px;
}
.pf-ops { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 17px; }

/* ---------- CEO 指令台 ---------- */
.console-panel {
  width: min(760px, 94vw); height: min(660px, 90vh);
  background: linear-gradient(180deg, rgba(45, 226, 230, .03), transparent 30%), #0d141d;
  border: 1px solid rgba(45, 226, 230, .26); border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .72);
  display: flex; flex-direction: column; overflow: hidden; animation: setIn .2s ease both;
}
.console-head {
  display: flex; align-items: center; gap: 11px; padding: 13px 17px;
  border-bottom: 1px solid #1b2530; flex: 0 0 auto;
}
.console-head .con-ico {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 26%, #7fe6ef, #0e9aa0 62%, #06555a);
  box-shadow: 0 0 14px rgba(45, 226, 230, .4); color: #04262a;
}
.console-head .con-ico svg { width: 15px; height: 15px; }
.console-head h2 { margin: 0; font-size: 13px; font-weight: 600; color: #eef3f8; }
.console-head .con-sub { font-size: 9.5px; color: #5c6b7d; margin-top: 2px; }
.console-head .set-close { margin-left: auto; }

.console-body { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.console-log { flex: 1 1 auto; overflow-y: auto; padding: 15px 17px; }
.console-log::-webkit-scrollbar { width: 8px; }
.console-log::-webkit-scrollbar-thumb { background: #1d2a37; border-radius: 8px; }
.cm-msg { margin-bottom: 13px; display: flex; gap: 9px; align-items: flex-start; }
.cm-msg b {
  flex: 0 0 auto; font-size: 9.5px; padding: 2px 7px; border-radius: 5px; font-weight: 600;
  background: rgba(255, 255, 255, .06); color: #8d9bad; margin-top: 1px;
}
.cm-msg.user b { background: rgba(255, 122, 41, .16); color: #ffb27d; }
.cm-msg.bot b { background: rgba(45, 226, 230, .16); color: #7fe6ef; }
.cm-msg > span { flex: 1 1 auto; font-size: 12px; color: #dce6f0; line-height: 1.7; }
.cm-msg.pending > span { color: #5c6b7d; font-style: italic; }
.cm-steps { margin-top: 7px; display: flex; flex-direction: column; gap: 4px; }
.cm-step {
  font-size: 10px; padding: 4px 8px; border-radius: 5px; border-left: 2px solid;
  background: rgba(255, 255, 255, .022);
}
.cm-step.ok { border-left-color: #37dd86; }
.cm-step.bad { border-left-color: #f97356; }
.cm-step code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #7fe6ef; }
.cm-step span { color: #ff9d90; margin-left: 8px; }

.console-sugg {
  display: flex; align-items: center; gap: 6px; padding: 8px 17px;
  border-top: 1px solid #1b2530; flex-wrap: wrap;
}
.console-sugg > span { font-size: 9.5px; color: #5c6b7d; }
.console-chip {
  border: 1px solid #26323f; background: rgba(255, 255, 255, .03); color: #9dabbb;
  padding: 3px 9px; border-radius: 999px; font-size: 10px; cursor: pointer; transition: .16s;
}
.console-chip:hover { color: #7fe6ef; border-color: rgba(45, 226, 230, .45); background: rgba(45, 226, 230, .08); }

.console-input {
  display: flex; gap: 9px; padding: 11px 17px; border-top: 1px solid #1b2530; align-items: flex-end;
}
.console-input textarea {
  flex: 1 1 auto; background: #0a1017; border: 1px solid #23303d; color: #eef3f8;
  border-radius: 8px; padding: 9px 11px; font-size: 12px; font-family: inherit; resize: none;
  line-height: 1.6; transition: .16s;
}
.console-input textarea:focus { outline: none; border-color: rgba(45, 226, 230, .5); box-shadow: 0 0 12px rgba(45, 226, 230, .14); }
.console-send {
  border: 1px solid rgba(45, 226, 230, .45); background: rgba(45, 226, 230, .13);
  color: #7fe6ef; padding: 9px 17px; border-radius: 8px; font-size: 12px; cursor: pointer;
  transition: .16s; font-family: inherit; white-space: nowrap;
}
.console-send:hover { background: rgba(45, 226, 230, .24); box-shadow: 0 0 16px rgba(45, 226, 230, .26); }

.console-state {
  padding: 8px 17px; border-top: 1px solid #1b2530; font-size: 10px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.cs-ok { color: #5fe0a8; }
.cs-warn { color: #f5c76b; }
.cs-err { color: #ff9d90; }
.cs-confirm-btn {
  border: 1px solid rgba(249, 115, 86, .45); background: rgba(249, 115, 86, .13);
  color: #ff9d90; padding: 3px 10px; border-radius: 999px; font-size: 10px; cursor: pointer;
}
.cs-confirm-btn:hover { background: rgba(249, 115, 86, .25); }

/* ---------- 确认池 ---------- */
.cf-panel {
  width: min(560px, 94vw); max-height: 84vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(249, 115, 86, .035), transparent 30%), #0d141d;
  border: 1px solid rgba(249, 115, 86, .3); border-radius: 13px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .72); animation: setIn .18s ease both;
}
.cf-panel::-webkit-scrollbar { width: 8px; }
.cf-panel::-webkit-scrollbar-thumb { background: #1d2a37; border-radius: 8px; }
.cf-panel .pf-title { border-bottom-color: rgba(249, 115, 86, .2); }
.cf-item {
  border: 1px solid rgba(249, 115, 86, .22); border-radius: 9px;
  padding: 11px 13px; margin: 12px 14px; background: rgba(249, 115, 86, .05);
}
.cf-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.cf-head b { font-size: 12px; color: #eef3f8; }
.cf-risk {
  font-size: 8.5px; color: #ff9d90; border: 1px solid rgba(249, 115, 86, .4);
  border-radius: 3px; padding: 0 5px; margin-left: auto;
}
.cf-detail {
  font-size: 10px; color: #a9b8c8; background: rgba(0, 0, 0, .3); border-radius: 6px;
  padding: 8px 10px; margin: 0 0 9px; white-space: pre-wrap; word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.6;
}
.cf-ops { display: flex; gap: 8px; justify-content: flex-end; }
.cf-ops .pg-btn {
  border-color: #26323f; background: rgba(255, 255, 255, .035); color: #9dabbb;
}
.cf-ops .pg-btn:hover { color: #eef3f8; border-color: rgba(45, 226, 230, .45); }
.cf-ops .pg-btn:not(.ghost) {
  border-color: rgba(249, 115, 86, .45); background: rgba(249, 115, 86, .13); color: #ff9d90;
}
.cf-ops .pg-btn:not(.ghost):hover { background: rgba(249, 115, 86, .26); }

/* toast 变体 */
.toast-err { border-left-color: #f97356; }
.toast-ok { border-left-color: #37dd86; }

/* ---------- 顶栏头像（账号入口） ---------- */
.avatar { cursor: pointer; transition: .16s; }
.avatar:hover {
  box-shadow: 0 0 18px rgba(255, 122, 41, .65);
  transform: scale(1.06);
}

/* ---------- 设置分组小贴士 ---------- */
.set-tip {
  margin-top: 9px; font-size: 9.5px; color: #5c6b7d; line-height: 1.6;
}
.set-btn.primary {
  border-color: rgba(255, 122, 41, .5);
  background: rgba(255, 122, 41, .14);
  color: #ffb27d;
  font-weight: 600;
}
.set-btn.primary:hover {
  background: rgba(255, 122, 41, .26);
  border-color: rgba(255, 122, 41, .75);
  color: #ffd0a8;
}

/* ---------- 导航分组标题 ---------- */
.nav-group {
  font-size: 8.5px; letter-spacing: .14em; color: #4a5765;
  padding: 9px 11px 4px; text-transform: uppercase; white-space: nowrap;
}
.nav-group:first-child { display: none; }

/* ---------- 账号面板 ---------- */
#account-mask { z-index: 82; }
#account-card .pf-title { display: flex; align-items: center; justify-content: space-between; }
#account-card .pf-title .set-close { margin-left: auto; }
#account-card input[readonly] { opacity: .6; cursor: default; }

/* ---------- 移动端 ---------- */
@media (max-width: 767px) {
  .set-panel, .console-panel { width: 100vw; height: 100vh; border-radius: 0; }
  .set-body { flex-direction: column; }
  .set-tabs { width: 100%; flex: 0 0 auto; border-right: none; border-bottom: 1px solid #1b2530; display: flex; gap: 5px; overflow-x: auto; padding: 8px; }
  .set-tab { min-width: 132px; margin-bottom: 0; flex: 0 0 auto; }
  .set-fields { grid-template-columns: 1fr; }
  .pg-actions { width: 100%; margin-left: 0; }
  .pg-btn { flex: 1 1 auto; min-height: 38px; }
  .pg-kpis { gap: 7px; }
  .pg-kpi { flex: 1 1 44%; min-width: 0; }
  .page-wrap { padding: 12px; }
  .pg-cal-cell { min-height: 46px; padding: 3px; }
  .pg-cal-item { font-size: 8.5px; }
  .pf-grid { grid-template-columns: 1fr; }
  /* 触控目标放大到 44px（移动端可点性硬指标）*/
  .top-btn { min-width: 44px; min-height: 44px; justify-content: center; padding: 8px 10px; }
  .top-btn svg { width: 17px; height: 17px; }
  .pg-cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .pg-cal-list { padding: 10px; }
  .pg-cal-row { flex-wrap: wrap; gap: 6px; }
  .pg-cal-title { flex: 1 1 100%; order: -1; }
  .console-sugg { padding: 7px 12px; }
  .console-input { padding: 9px 12px; }
  .console-log { padding: 12px; }
}

/* ---------- 手机端：顶栏瘦身（v0.3.0）----------
   顶栏按钮一多就撑破屏幕（真问题：溢出 197px）。
   做法：手机上把「指令台 / 待确认 / 系统设置」收进导航抽屉，
        顶栏只留汉堡按钮 —— 保证任何宽度下都不横向溢出。 */
@media (max-width: 767px) {
  .topbar-right #console-btn,
  .topbar-right #confirms-btn,
  .topbar-right #settings-btn { display: none; }
  /* 抽屉里的移动版入口 */
  .nav .m-nav-extra { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #17212c; }
  .nav .m-nav-extra button {
    display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
    border: 1px solid transparent; background: transparent; color: #7d8b9c;
    padding: 11px 12px; border-radius: 7px; font-size: 13px; min-height: 44px;
    cursor: pointer; transition: .18s; font-family: inherit;
  }
  .nav .m-nav-extra button:hover { color: #dfe8f2; background: rgba(255, 255, 255, .035); }
  .nav .m-nav-extra button svg { width: 15px; height: 15px; flex: 0 0 auto; }
  .nav .m-nav-extra button .tb-badge { margin-left: auto; }
}
@media (min-width: 768px) {
  .nav .m-nav-extra { display: none !important; }
}
