:root { color-scheme: dark; }

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  color: #fff;
  background: #2e719b;
}

/* 页面底色：纯色。真正的背景由 .bg-layer 按用户设置覆盖（见下）。 */
.page {
  min-height: 100vh;
  background: #2e719b;
}

/*
 * 背景层：整屏一层纯色（或背景图片），固定不动、没有任何动画。
 *
 * 这里以前是「滑动渐变 + 色相循环」：把渐变画成视口 4 倍大再平移 background-position。
 * 已经去掉 —— 它每帧都要重绘整屏，而这一层上方任何 backdrop-filter 都会把重绘
 * 放大成整块模糊重算，那才是之前发卡的根因。纯色一层不触发任何重绘。
 */
.bg-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* 页脚和主体都是 z-index:1 的同级元素：主体内部的浮层（哪怕 z-index 再高）也会被页脚压住，
   所以把主体抬到 2 —— 这样「全市场涨跌分布」这类悬停浮层能盖住页脚那行"本站已苟活/当前时辰"。 */
.hero, .search, .footer { position: relative; z-index: 1; }
.content { position: relative; z-index: 2; }

#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  background: #b3261e;
  color: #fff;
  padding: 12px 20px;
  font-size: 13px;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, .3);
}
#blazor-error-ui .reload { color: #ffe08a; margin-left: 12px; }
#blazor-error-ui .dismiss { cursor: pointer; margin-left: 12px; position: absolute; right: 16px; }

.boot { padding: 90px 20px; text-align: center; color: rgba(255, 255, 255, .8); }

/* ---------- 右上角：设置 ---------- */
.top-actions {
  position: fixed;
  top: 8px; right: 12px;
  padding: 10px;            /* 撑出更大的悬停热区；8+10=18 / 12+10=22，按钮视觉位置不变 */
  display: flex; gap: 10px;
  z-index: 30;
}
/*
 * 设置按钮带 backdrop-filter，常驻会让浏览器持续重算模糊。
 * 默认隐藏，鼠标移到热区再显示。
 * 用 visibility:hidden 而不是只把 opacity 设 0 —— opacity:0 的元素仍然参与渲染，
 * 省不下 GPU；visibility:hidden 才会真的把它从渲染树里摘掉。
 */
.top-actions .icon-btn {
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.top-actions:hover .icon-btn,
.top-actions:focus-within .icon-btn {
  opacity: 1;
  visibility: visible;
}
/* 触屏设备没有悬停，直接常显，避免点不到 */
@media (hover: none) {
  .top-actions .icon-btn { opacity: 1; visibility: visible; }
}
.seg {
  display: flex;
  background: rgba(8, 30, 48, .55);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  overflow: hidden;
  /* 原为 backdrop-filter: blur(6px)；底色已足够深，去掉模糊观感几乎无差别，
     但鼠标停在这里时不会再每帧重算一次背景模糊 */
}
.seg button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .65);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
}
.seg button.on { background: rgba(255, 255, 255, .16); color: #fff; }
.seg button:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.icon-btn {
  width: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 30, 48, .55);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  color: rgba(255, 255, 255, .85);
  cursor: pointer;
  /* 原为 backdrop-filter: blur(6px)；理由同 .seg */
  transition: .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- 标题与时钟 ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  margin: 0 auto;
  padding-top: 52px;
}
.hero-line { display: flex; align-items: baseline; gap: 18px; }
.hero-line h1 {
  margin: 0;
  font-size: 46px;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 0 28px rgba(140, 210, 255, .5), 0 2px 6px rgba(0, 0, 0, .25);
}
.bar { width: 1px; height: 34px; background: rgba(255, 255, 255, .45); align-self: center; }
.clock {
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(140, 210, 255, .45);
}
.hero-date {
  align-self: flex-end;
  margin-top: 2px;
  padding-right: 4px;
  font-size: 13px;
  color: rgba(205, 232, 248, .85);
}

/* ---------- 搜索框 ---------- */
.search {
  display: flex; align-items: center; gap: 10px;
  width: min(880px, calc(100vw - 160px));
  margin: 22px auto 8px;
  padding: 0 8px 0 16px;
  height: 46px;
  border-radius: 23px;
  /*
   * 这里原来是 backdrop-filter: blur(8px)。它在页面正中最显眼的位置常驻，
   * 而背后那层渐变一直在动 —— 背景每变一帧，这 880×46 的区域就要把背后内容
   * 重新抠出来模糊一次。改成只用半透明底色，观感几乎无差别，
   * 但每帧的模糊重算直接归零。
   */
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  transition: .15s;
}
.search:focus-within { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); }
.search > svg { color: rgba(255, 255, 255, .75); flex: none; }
.search input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: 0;
  color: #fff; font-size: 14px;
}
.search input::placeholder { color: rgba(255, 255, 255, .55); }
.search button {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .14);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.search button:hover { background: rgba(255, 255, 255, .26); }

/* ---------- 分组与卡片 ---------- */
.content { max-width: 1780px; margin: 0 auto; padding: 10px 56px 30px; }
/* 分组标签栏：搜索框下方，一行排、左右居中（分组多了横向滚动，不换行） */
.gtabs-wrap { overflow-x: auto; padding: 8px 0 2px; }
.gtabs { display: flex; flex-wrap: nowrap; gap: 10px; width: max-content; margin: 0 auto; }
.gtab {
  flex: none;
  padding: 7px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(9, 34, 54, .42);
  color: rgba(255, 255, 255, .82);
  cursor: pointer;
  white-space: nowrap;
  transition: .18s;
  text-shadow: 0 0 18px rgba(140, 210, 255, .35);
}
.gtab:hover {
  background: rgba(23, 62, 92, .66);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
}
.gtab.on {
  background: rgba(63, 151, 216, .34);
  border-color: rgba(127, 208, 255, .8);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 10, 20, .28);
}
.group { margin-top: 22px; }
.cards { display: flex; flex-wrap: wrap; gap: 14px 16px; }
.card {
  width: 178px; height: 64px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(9, 34, 54, .48);
  border: 1px solid rgba(255, 255, 255, .07);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: .18s;
  user-select: none;
}
.card:hover {
  background: rgba(23, 62, 92, .66);
  border-color: rgba(255, 255, 255, .16);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 10, 20, .25);
}
.card.disabled { opacity: .55; cursor: default; }
.card.disabled:hover {
  transform: none;
  background: rgba(9, 34, 54, .48);
  border-color: rgba(255, 255, 255, .07);
  box-shadow: none;
}
.icon {
  width: 40px; height: 40px;
  border-radius: 9px;
  object-fit: cover;
  flex: none;
  background: #fff;
}
.avatar {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 19px;
}
.txt { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.txt .t {
  font-size: 13.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.txt .s {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255, 255, 255, .5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.empty { color: rgba(255, 255, 255, .55); font-size: 13px; padding: 8px 2px; }
.big-empty {
  margin: 90px auto 0;
  max-width: 460px;
  text-align: center;
  color: rgba(255, 255, 255, .85);
}
.big-empty .be-icon { font-size: 40px; opacity: .8; }
.big-empty .be-text { margin-top: 12px; font-size: 19px; font-weight: 700; }
.big-empty .be-sub { margin-top: 8px; font-size: 13px; color: rgba(255, 255, 255, .55); line-height: 1.7; }
.cards.fixed-cols {
  display: grid;
  grid-template-columns: repeat(var(--per-row, 9), minmax(0, 240px));
  justify-content: start;
}
.cards.fixed-cols .card { width: auto; }

/* ---------- 页脚 ---------- */
.footer {
  text-align: center;
  padding: 26px 0 40px;
  font-size: 13px;
  color: rgba(210, 236, 250, .9);
}
.f-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.f-row.dim { margin-top: 10px; color: rgba(190, 222, 240, .75); font-size: 12.5px; }
.f-row .days { color: #7fe0ff; }
.f-row b { font-weight: 700; }
.f-row { font-variant-numeric: tabular-nums; }
.beat { color: #56d4ff; animation: beat 1.6s infinite; }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.25); }
  24% { transform: scale(1); }
}
.sep { width: 1px; height: 12px; background: rgba(255, 255, 255, .25); }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card {
  width: 370px;
  padding: 38px 34px;
  border-radius: 18px;
  background: rgba(8, 30, 48, .55);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 8, 16, .4);
}
.login-title {
  font-size: 26px; font-weight: 800; text-align: center;
  text-shadow: 0 0 18px rgba(140, 210, 255, .5);
}
.login-sub {
  margin: 10px 0 22px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .6);
  text-align: center;
  line-height: 1.6;
}
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form input {
  height: 40px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  padding: 0 12px;
  outline: none;
  font-size: 14px;
}
.login-form input:focus { border-color: rgba(255, 255, 255, .45); }
/* 验证码：输入框在左，图片在右；点图片换一张 */
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row input { flex: 1; min-width: 0; }
.captcha-btn {
  flex: none;
  width: 132px; height: 40px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
  cursor: pointer;
  overflow: hidden;
}
.captcha-btn:hover { border-color: rgba(255, 255, 255, .45); }
.captcha-btn img { width: 100%; height: 100%; display: block; object-fit: cover; }
.login-form .login-submit {
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #3f97d8, #2a6da3);
  color: #fff;
  font-weight: 700;
  letter-spacing: 6px;
  cursor: pointer;
}
.login-form .login-submit:hover { filter: brightness(1.12); }
.login-form .login-submit:disabled { opacity: .6; cursor: default; }
.login-err { margin-top: 12px; color: #ff9d9d; font-size: 12.5px; }

/* ---------- 设置弹窗 ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(2, 14, 26, .55);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.dialog {
  width: min(960px, 94vw);
  height: min(660px, 90vh);
  display: flex; flex-direction: column;
  background: #102a40;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 5, 15, .5);
  overflow: hidden;
}
.dlg-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.tabs { display: flex; gap: 6px; }
.tabs button {
  border: 0; background: transparent;
  color: rgba(255, 255, 255, .6);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.tabs button.on { background: rgba(255, 255, 255, .12); color: #fff; }
.x {
  border: 0; background: transparent;
  color: rgba(255, 255, 255, .7);
  font-size: 15px;
  cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 8px;
}
.x:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.dlg-body { flex: 1; display: flex; min-height: 0; }
.dlg-body.site { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 20px; overflow: auto; }
.site-section {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
}
.site-section .sec-title {
  font-size: 13px;
  font-weight: 700;
  color: #7fd0ff;
  letter-spacing: 1px;
}

/* 左列：分组 */
.grp-col {
  width: 252px; flex: none;
  border-right: 1px solid rgba(255, 255, 255, .08);
  padding: 14px;
  overflow: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.col-title {
  font-size: 13px; font-weight: 700;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.col-title i {
  font-style: normal; font-weight: 400;
  color: rgba(255, 255, 255, .45);
  font-size: 12px; margin-left: 6px;
}
.grp-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  background: rgba(255, 255, 255, .04);
  border: 1px solid transparent;
}
.grp-row:hover { background: rgba(255, 255, 255, .09); }
.grp-row.sel { background: rgba(63, 151, 216, .22); border-color: rgba(96, 178, 230, .45); }
.grp-row.editing { background: rgba(255, 255, 255, .08); cursor: default; }
.grp-row.editing input { flex: 1; min-width: 0; margin-right: 6px; }
.grp-row .gname {
  font-size: 13.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.grp-row .gname i {
  font-style: normal; font-weight: 400;
  color: rgba(255, 255, 255, .45);
  font-size: 11.5px; margin-left: 4px;
}
.grp-row .ops { display: flex; gap: 2px; flex: none; }
.mini {
  border: 0; background: transparent;
  color: rgba(255, 255, 255, .55);
  cursor: pointer;
  font-size: 12px;
  padding: 3px 5px;
  border-radius: 5px;
}
.mini:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.mini.danger:hover { background: rgba(220, 80, 80, .35); color: #ffb3b3; }
.mini.ok { color: #7fe0ff; }
.add-grp {
  margin-top: 6px;
  border: 1px dashed rgba(255, 255, 255, .25);
  background: transparent;
  color: rgba(255, 255, 255, .75);
  border-radius: 9px;
  padding: 9px;
  cursor: pointer;
  font-size: 13px;
}
.add-grp:hover { background: rgba(255, 255, 255, .07); color: #fff; }

/* 右列：标签 */
.link-col {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  padding: 14px 18px;
  overflow: auto;
}
.col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
}
.link-row:hover { background: rgba(255, 255, 255, .08); }
.licon {
  width: 34px; height: 34px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
  background: #fff;
}
.licon.avatar {
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.licon.big { width: 46px; height: 46px; font-size: 20px; }
.linfo { flex: 1; min-width: 0; }
.lname { font-size: 13.5px; font-weight: 600; }
.lname span {
  color: rgba(255, 255, 255, .45);
  font-weight: 400; font-size: 11.5px; margin-left: 6px;
}
.lurl { margin-top: 3px; display: flex; align-items: center; gap: 5px; overflow: hidden; }
.lurl .u {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .45);
  max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lurl .u.none { color: rgba(255, 180, 120, .7); }
.tag {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  flex: none;
}
.tag.in { background: rgba(90, 200, 140, .25); color: #8ce8b4; }
.tag.ex { background: rgba(90, 170, 240, .25); color: #9cccff; }
.tag.off { background: rgba(220, 90, 90, .25); color: #ffb0b0; }
.link-row .ops { display: flex; gap: 2px; flex: none; }
/* 标签右侧的「主页面显示」开关；关掉后整行变淡，仍可再次打开 */
.link-row .tag-visible { margin-left: 6px; flex: none; }
.link-row.off { opacity: .55; }
.link-row.off .lname { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .35); }
.hint { color: rgba(255, 255, 255, .5); font-size: 13px; padding: 20px 4px; }

/* 右列：左键拖动标签排序 / 拖到左侧分组换分组 */
.link-row { cursor: grab; }
.link-row .licon { -webkit-user-drag: none; user-select: none; }
.link-tip {
  font-size: 12px;
  color: rgba(255, 255, 255, .42);
  margin: -4px 0 10px;
}
/* 被拖的那一行留在原地淡下去，真正跟着鼠标走的是下面的幽灵卡片 */
.link-row.dragging { opacity: .3; }
/* 插入位置：蓝色细线（列表 gap 是 8px，±5px 正好落在缝隙中间） */
.link-row.drop-before,
.link-row.drop-after { position: relative; }
.link-row.drop-before::after,
.link-row.drop-after::after {
  content: "";
  position: absolute; left: 0; right: 0; height: 2px;
  border-radius: 2px;
  background: #6cc6ff;
  box-shadow: 0 0 8px rgba(108, 198, 255, .9);
}
.link-row.drop-before::after { top: -5px; }
.link-row.drop-after::after { bottom: -5px; }
.link-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  box-sizing: border-box;
  background: rgba(18, 44, 66, .95);
  border: 1px solid rgba(108, 198, 255, .8);
  box-shadow: 0 12px 28px rgba(0, 6, 16, .5);
  opacity: .96;
  transform: rotate(-1deg);
}
/* 左侧分组：标签拖到哪一行，哪一行就亮起来 */
.grp-row.drop-target {
  background: rgba(63, 151, 216, .32);
  border-color: #6cc6ff;
  box-shadow: 0 0 0 1px rgba(108, 198, 255, .75) inset;
}
/* 拖拽过程中禁掉文字选区，光标统一成"抓着一团东西" */
body.nav-dragging,
body.nav-dragging * { user-select: none; -webkit-user-select: none; cursor: grabbing !important; }

/* 按钮 / 表单 */
.btn {
  border: 0;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn.primary { background: linear-gradient(135deg, #3f97d8, #2a6da3); color: #fff; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.ghost {
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .85);
  border: 1px solid rgba(255, 255, 255, .14);
}
.btn.ghost:hover { background: rgba(255, 255, 255, .18); }
.btn:disabled { opacity: .55; cursor: default; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.w420 { width: 420px; max-width: 100%; }
.field.w360 { width: 360px; max-width: 100%; }
.field.w200 { width: 200px; }
/* 站点图标：跟在「站点标题 / 开站日期」右边的同一行里 */
.favicon-field { width: auto; min-width: 240px; }
.favicon-field .icon-edit { gap: 8px; flex-wrap: nowrap; }
.favicon-field .btn { padding: 6px 10px; font-size: 12.5px; white-space: nowrap; }
.field > span { font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.field input {
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: 0 12px;
  outline: none;
  font-size: 13.5px;
}
.field input:focus { border-color: rgba(120, 195, 240, .6); background: rgba(255, 255, 255, .12); }
/* 自绘日期选择器（替代原生 date 弹层，弹层始终深色） */
.dd-menu.cal { max-height: none; overflow: visible; }
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; padding: 4px 6px 8px;
}
.cal-nav {
  flex: none; width: 28px; height: 28px;
  border: 0; background: transparent; color: rgba(255, 255, 255, .8);
  border-radius: 7px; font-size: 16px; cursor: pointer;
}
.cal-nav:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.cal-title { font-size: 13px; font-weight: 600; color: #fff; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 34px);
  gap: 2px; justify-items: center; padding-bottom: 4px;
}
.cal-dow {
  width: 34px; text-align: center; font-size: 11px;
  color: rgba(255, 255, 255, .45); padding-bottom: 4px;
}
.cal-day {
  width: 34px; height: 30px;
  border: 0; background: transparent; color: rgba(255, 255, 255, .85);
  border-radius: 7px; font-size: 12.5px; cursor: pointer;
}
.cal-day:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.cal-day.empty { visibility: hidden; cursor: default; }
.cal-day.today { color: #7fd0ff; font-weight: 700; }
.cal-day.sel { background: rgba(63, 151, 216, .35); color: #fff; font-weight: 700; }
.two { display: flex; gap: 14px; }
.two .field { flex: 1; }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field.w220 { width: 220px; }
.field.w180 { width: 180px; }
.field.w520 { width: 520px; max-width: 100%; }
/* 「布局与搜索」：五个字段收窄 + 缩间距，正常桌面宽度下正好一行排开；
   窗口太窄时仍然按默认换行，不会横向溢出去 */
.field-row.tight { gap: 10px; }
.field.w160 { width: 160px; min-width: 0; }
.field-row.tight .field input,
.field-row.tight .field .dd-btn { padding: 0 8px; font-size: 13px; }
.field select {
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: #1e3c55;
  color: #fff;
  padding: 0 10px;
  outline: none;
  font-size: 13.5px;
}
.field select option {
  background: #14334c;
  color: #fff;
}

/* 自绘下拉框（替代原生 select，弹层始终深色） */
.dd { position: relative; width: 100%; }
.dd-btn {
  width: 100%;
  height: 38px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #1e3c55;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  color: #fff;
  padding: 0 10px;
  font-size: 13.5px;
  cursor: pointer;
}
.dd-btn:hover { border-color: rgba(120, 195, 240, .6); }
.dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-caret { flex: none; opacity: .7; }
.dd-backdrop { position: fixed; inset: 0; z-index: 130; }
.dd-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-height: 244px;
  overflow: auto;
  background: #14334c;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 5, 15, .55);
  padding: 4px;
  z-index: 140;
}
.dd-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, .85);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}
.dd-item:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.dd-item.sel { background: rgba(63, 151, 216, .3); color: #7fd0ff; font-weight: 600; }
.dlg-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}
.dlg-note { margin-right: auto; font-size: 12.5px; color: rgba(255, 255, 255, .5); }
.seg.small button { padding: 6px 12px; font-size: 12.5px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 44px; height: 30px;
  border-radius: 7px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.swatch:hover { border-color: rgba(255, 255, 255, .35); }
.swatch.sel { border-color: #7fd0ff; box-shadow: 0 0 8px rgba(127, 208, 255, .5); }

/* 第 7 个色块：自选颜色。里面套一个铺满的透明 color input，点色块就等于点它 */
.swatch.custom {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.swatch.custom input[type=color] {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  border: 0; padding: 0;
  cursor: pointer;
}
.swatch-plus {
  position: relative;
  font-size: 15px; font-weight: 700; line-height: 1;
  color: #fff;
  text-shadow: 0 0 3px rgba(0, 0, 0, .8);
  pointer-events: none;   /* 让点击穿到下面的 input */
}
.bg-hex {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .65);
}
.bg-edit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* 背景（纯色）：左边是颜色预览，右边是预设色块，同一行 */
.bg-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.bg-preview {
  width: 140px; height: 32px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .2);
}
/* 站点图标预览（管理员 → 站点管理） */
.site-icon-preview {
  width: 40px; height: 40px;
  object-fit: contain;
  padding: 3px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
}
.bg-thumb {
  width: 120px; height: 68px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .2);
}
.icon-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type=file] {
  position: absolute; inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 100px;
}
.tip { font-size: 11.5px; color: rgba(255, 255, 255, .4); margin-top: 4px; }
/* 自动抓取后的候选图标：缩略图 + 选中态；第一项的“标签页”说明排在图下方，不用绝对定位，避免压住图标 */
.icon-pick { margin-top: 10px; }
.icon-pick .tip { margin-top: 0; }
.icon-pick-row { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.icon-opt {
  width: 48px;
  padding: 4px 4px 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.icon-opt img { width: 40px; height: 40px; object-fit: contain; }
.icon-opt:hover { border-color: rgba(255, 255, 255, .35); }
.icon-opt.sel { border-color: #7fd0ff; box-shadow: 0 0 8px rgba(127, 208, 255, .5); }
.icon-opt-tag {
  font-size: 9.5px; line-height: 1.4;
  color: #7fd0ff;
  white-space: nowrap;
}
.err { color: #ff9d9d; font-size: 12.5px; }
.ok { color: #8ce8b4; font-size: 12.5px; }
.acct-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.acct-grid input {
  flex: 1; min-width: 160px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: 0 12px;
  outline: none;
  font-size: 13.5px;
}
.acct-grid input:focus { border-color: rgba(120, 195, 240, .6); }
.acct-grid .btn { flex: none; }
.add-user-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.add-user-row input {
  width: 260px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: 0 12px;
  outline: none;
  font-size: 13.5px;
}
.add-user-row input:focus { border-color: rgba(120, 195, 240, .6); }
.dlg-body.users { flex-direction: column; align-items: stretch; padding: 20px; overflow: auto; gap: 12px; }
.users-table { border-collapse: collapse; width: 100%; margin: 0 auto; font-size: 13.5px; }
.users-table th, .users-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.users-table th { color: rgba(255, 255, 255, .55); font-weight: 600; font-size: 12.5px; }
/* 站点管理 → 用户表：列名居中；数据行仍然左对齐 */
.users-table.user-mgmt-table th { text-align: center; }
/* 站点管理 → 权限列：便签 / 股市 两个圆的单选按钮（勾给谁，谁的「分组与标签」里才出现） */
.users-table .perm-cell { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.users-table .perm-cell .radio { font-size: 12.5px; gap: 5px; }

/* 标签编辑子弹窗 */
.sub-overlay {
  position: fixed; inset: 0;
  background: rgba(2, 14, 26, .6);
  z-index: 120;
  display: flex; align-items: center; justify-content: center;
}
.sub-dialog {
  width: min(560px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: #14334c;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 5, 15, .55);
}
.sub-head {
  padding: 16px 20px;
  font-size: 16px; font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sub-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.sub-foot {
  padding: 14px 20px;
  display: flex; justify-content: flex-end; gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

/* 居中的确认弹窗 */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(2, 14, 26, .6);
  z-index: 150;
  display: flex; align-items: center; justify-content: center;
}
.confirm-box {
  background: #14334c;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 24px 70px rgba(0, 5, 15, .55);
  min-width: 320px;
  max-width: 90vw;
}
.confirm-text { font-size: 14.5px; line-height: 1.6; margin-bottom: 18px; white-space: pre-line; }
.confirm-ops { display: flex; justify-content: flex-end; gap: 10px; }

/* 小屏适配 */
@media (max-width: 900px) {
  .content { padding: 10px 20px 30px; }
  .hero-line h1 { font-size: 32px; }
  .clock { font-size: 22px; }
  .search { width: calc(100vw - 32px); }
  .grp-col { width: 200px; }
}

/* ---------- 便签 ---------- */
/* 卡片墙最后那个 ＋ 卡片：默认看不见，鼠标停在它上面满 2 秒才淡入（移开立刻淡出）。
   用 transition-delay 实现，纯 CSS，不用 JS、不碰服务端。 */
.card.add-card {
  background: rgba(255, 255, 255, .03);
  border: 1px dashed rgba(255, 255, 255, .28);
  justify-content: center;
  opacity: 0;
  transition: opacity .22s ease;
}
.card.add-card:hover {
  background: rgba(63, 151, 216, .2);
  border-color: rgba(127, 208, 255, .65);
  border-style: dashed;
  transform: none;          /* 别跟着其它卡片一起"浮起来"，免得暴露位置 */
  box-shadow: none;
  opacity: 1;
  transition-delay: 2s;     /* 悬停满 2 秒才出现（按用户要求从 3 秒改成 2 秒） */
}
.card.add-card .plus {
  font-size: 26px; font-weight: 700; line-height: 1;
  color: rgba(255, 255, 255, .75);
}
/* 便签卡片：左边加一道蓝边，一眼区分"这是便签、不是网址" */
.card.note { border-left: 3px solid rgba(127, 208, 255, .55); }

/* 设置里「便签 / 股市」两行右侧的勾选框（同一个样式，方块勾） */
.grp-row.notes .chk, .grp-row.stock .chk { display: flex; align-items: center; padding: 2px; cursor: pointer; }
.grp-row.notes .chk input, .grp-row.stock .chk input {
  width: 15px; height: 15px;
  accent-color: #3f97d8;
  cursor: pointer;
}

/* 单选按钮（「服务器管理」等）：看着是圆的单选，但能再点一下取消 */
.radio {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255, 255, 255, .85);
  white-space: nowrap;
}
.radio input {
  appearance: none; -webkit-appearance: none;
  width: 15px; height: 15px;
  margin: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  position: relative;
  flex: none;
}
.radio input:checked { border-color: #5ec2ff; }
.radio input:checked::after {
  content: "";
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: #5ec2ff;
}
.radio:hover input { border-color: rgba(255, 255, 255, .75); }

/* 方形勾选框（「服务器管理」）：选中时显示对号 */
.check-square {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: rgba(255, 255, 255, .85);
  white-space: nowrap;
}
.check-square .box {
  width: 15px; height: 15px;
  border-radius: 3px;
  border: 1.5px solid rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .06);
  position: relative;
  flex: none;
}
.check-square.on .box { border-color: #5ec2ff; background: rgba(63, 151, 216, .25); }
.check-square.on .box::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #7fd0ff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-square:hover .box { border-color: rgba(255, 255, 255, .75); }
.check-square:focus-visible { outline: 2px solid rgba(127, 208, 255, .7); outline-offset: 3px; border-radius: 6px; }

/* 系统分组那一行右侧的锁 */
.mini-tag {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .45);
  padding: 2px 4px;
}

/* ---------- 服务器信息面板（「系统」分组） ---------- */
.server-panel { display: flex; flex-direction: column; gap: 10px; }
.server-panel .sp-head { display: flex; align-items: baseline; gap: 10px; }
.server-panel .sp-title { font-size: 15px; font-weight: 700; color: #fff; }
.server-panel .sp-sub { font-size: 12px; color: rgba(255, 255, 255, .45); }
.server-panel .sp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}
.sp-item {
  background: rgba(9, 34, 54, .48);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  padding: 9px 12px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.sp-item .sp-k { font-size: 11.5px; color: rgba(255, 255, 255, .55); }
.sp-item .sp-v {
  font-size: var(--cf); font-weight: 700; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-item .sp-v.sm { font-size: 13px; font-weight: 600; }
.sp-bar {
  height: 5px; border-radius: 4px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}
.sp-bar i {
  display: block; height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #3f97d8, #6cc6ff);
  transition: width .4s ease;
}

/* 设置里的便签列表行（点一下打开编辑弹窗） */
.note-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  cursor: pointer;
}
.note-row:hover { background: rgba(255, 255, 255, .08); }
.note-row .licon { width: 34px; height: 34px; }

/* 便签编辑弹窗：正文用 textarea */
.note-dialog { width: min(640px, 94vw); }
.note-dialog .sub-foot .danger-ghost { margin-right: auto; }
.field textarea {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: 10px 12px;
  outline: none;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.65;
  resize: vertical;
  min-height: 160px;
}
.field textarea:focus { border-color: rgba(120, 195, 240, .6); background: rgba(255, 255, 255, .12); }
.btn.danger-ghost { background: rgba(220, 80, 80, .18); color: #ffb3b3; }
.btn.danger-ghost:hover { background: rgba(220, 80, 80, .32); }

/* ---------- 股市页（八张卡片 + 自选） ---------- */
.stock-panel { display: flex; flex-direction: column; gap: 12px; }
.st-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.st-title { font-size: 15px; font-weight: 700; color: #fff; }
.st-sub { font-size: 12px; color: rgba(255, 255, 255, .45); }
.st-head .btn { margin-left: auto; padding: 6px 12px; font-size: 12.5px; }
.st-err {
  font-size: 12.5px; color: #ffc0c0;
  background: rgba(220, 80, 80, .16);
  border: 1px solid rgba(220, 80, 80, .3);
  border-radius: 9px;
  padding: 9px 12px;
  line-height: 1.6;
}
/* 股市卡片区：固定 7 列，保证「全市场涨跌家数」正好落在「沪深北合计」右边（自选卡多了自动换行） */
.st-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1240px) {
  .st-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }
  .st-card.breadth .st-bd { font-size: 15px; }
  .st-card { --cf: 15px; }
}
/* 主体：左边卡片墙 + 右边一列（涨跌家数 + 四个按钮） */
.st-body { display: flex; align-items: flex-start; gap: 14px; }
.st-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.st-side { flex: none; width: 150px; display: flex; flex-direction: column; gap: 10px; }
/* 全市场涨跌家数：作为卡片挤在「沪深北合计」右边 */
/* 涨跌家数那张卡就占第 7 列；用两列网格让第二行的「涨停/跌停」和第一行的「涨/跌」左对齐
   （.st-bd-row 用 display:contents 让四个格子直接参与卡片的两列网格） */
.st-card.breadth {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 18px;
  row-gap: 6px;
  align-content: center;
}
.st-card.breadth .st-bd-row { display: contents; }
.st-card.breadth .st-k { padding-right: 0; font-size: 12.5px; }
/* 七个标签里的数字统一按左上角「当日成交额」的字号（16px），看起来才是一套 */
.st-card.breadth .st-bd { font-size: 16px; gap: 6px; }
.st-card.breadth .st-bd i { font-size: 11.5px; }   /* 与指数卡的小字（副标签/增减）一致 */
.st-bd-row { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.st-bd { display: inline-flex; align-items: baseline; gap: 5px; font-size: 13px; font-weight: 700; color: #fff; }
.st-bd i { font-style: normal; font-size: 11px; font-weight: 400; color: rgba(255, 255, 255, .45); }
.st-bd.up { color: #d32f2f; }
.st-bd.down { color: #388e3c; }
.st-bd.flat { color: rgba(255, 255, 255, .75); }
.st-bd-at { font-size: 11px; color: rgba(255, 255, 255, .38); }
/* 右边四个按钮：尺寸照抄顶部标签（.gtab）的几何，字体由 TabStyle 传进来 */
.st-btns { display: flex; flex-direction: column; gap: 8px; }
.st-btn {
  width: 100%;
  padding: 7px 20px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(9, 34, 54, .42);
  color: rgba(255, 255, 255, .82);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 0 18px rgba(140, 210, 255, .35);
}
.st-btn:hover { background: rgba(23, 62, 92, .66); border-color: rgba(255, 255, 255, .28); color: #fff; }
/* 选中的那个按钮（跟顶部标签的 .on 一套观感） */
.st-btn.on { background: rgba(63, 151, 216, .34); border-color: rgba(127, 208, 255, .8); color: #fff; }
/* 「自选」表格等按钮内容放的纸卡 */
.st-paper {
  background: rgba(9, 34, 54, .48);          /* 和上面的 .st-card 完全一致 */
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 18px;                        /* 圆角保持加大的 18 */
  padding: 18px 22px;
}
/* 「自选」纸卡：标题栏 + 悬停 3 秒才浮出的添加框 + 候选列表 */
.st-paper-head {
  display: flex; align-items: center; gap: 10px;
  min-height: 34px;
  margin-bottom: 6px;
}
.st-paper-title { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .6); letter-spacing: 1px; }
/* 「自选推荐」标题右边的 手动 / A股 / ETF / LOF / REIT 切换 */
.st-macd-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-macd-tabs .btn { padding: 4px 9px; font-size: 12px; line-height: 1.4; }
.st-macd-tabs .btn.on {
  background: rgba(63, 151, 216, .34);
  border-color: rgba(127, 208, 255, .8);
  color: #fff;
}
.st-macd-note { margin: 0 0 8px; font-size: 12px; color: rgba(255, 255, 255, .55); }
/* 添加框一直显示（按用户要求：不再等悬停 3 秒） */
.st-paper-head .st-addbar { margin-left: auto; }   /* 「添加」常显在最右边 */
.st-addbar { display: flex; align-items: center; gap: 8px; }
.st-addbar input {
  height: 32px; width: 320px; max-width: 46vw;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: 0 10px;
  outline: none;
  font-size: 12.5px;
}
.st-addbar input:focus { border-color: rgba(120, 195, 240, .6); background: rgba(255, 255, 255, .12); }
.st-addbar .btn { padding: 6px 14px; font-size: 12.5px; }
.st-addmsg { font-size: 11.5px; color: rgba(255, 255, 255, .55); }
/* 搜出来的候选：点一个就选中，再点「添加」入自选 */
.st-hits { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.st-hit {
  display: inline-flex; align-items: baseline; gap: 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .85);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12.5px;
}
.st-hit:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.st-hit.on { background: rgba(63, 151, 216, .32); border-color: rgba(127, 208, 255, .75); color: #fff; }
.st-hit-code { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: rgba(255, 255, 255, .6); }
.st-hit-type { font-size: 11px; color: rgba(255, 255, 255, .42); }
/* 「自选」那一页的表格 */
/* 可点开分时图的卡片 / 表格行 */
.st-card.clickable { cursor: pointer; }
.st-card.clickable:hover { border-color: rgba(127, 208, 255, .55); background: rgba(23, 62, 92, .55); }
.st-table tbody tr.clickable { cursor: pointer; }
.st-table tbody tr.clickable:hover td { background: rgba(63, 151, 216, .12); }
/* 分时图弹窗（仿同花顺：上面累计折线、下面每分钟柱子） */
/* 弹窗右上角「详情」：悬停展开同花顺 F10（四列自适应 + 亮点单列滚动） */
.ch-detail { position: relative; display: inline-flex; align-items: center; }
.ch-detail-q {
  padding: 1px 9px; font-size: 12px; font-weight: 700; border-radius: 7px; cursor: default;
  background: rgba(255, 214, 51, .14); border: 1px solid rgba(230, 184, 0, .75); color: #ffd633;
}
.ch-detail:hover .ch-detail-q { background: rgba(255, 214, 51, .3); color: #fff; }
.ch-detail-tip {
  display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 90;
  width: min(1180px, 93vw); max-width: min(1320px, 93vw); height: 552px; padding: 7px 9px;
  background: #0d2133; border: 1px solid rgba(127, 208, 255, .35); border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55); text-align: left; cursor: default;
}
.ch-detail:hover .ch-detail-tip { display: flex; gap: 8px; align-items: stretch; }
.ch-detail-loading { color: #9fc6e8; font-size: 12.5px; padding: 4px 6px; }
.ch-detail-main { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: max-content; }
.ch-detail-main > .ch-info-sec { width: 0; min-width: 100%; }          /* 概况/主营：宽度跟随左栏，不反向撑宽 */
.ch-detail-main > .ch-detail-main-row { width: max-content; }          /* 财务 + 估值 决定左栏多宽 */
.ch-detail-main > .ch-info-src { width: 0; min-width: 100%; }          /* 来源行也不许撑宽 */
.ch-detail-main-row { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px; align-items: start; }
.ch-info-sec { background: rgba(255, 255, 255, .04); border: 1px solid rgba(127, 208, 255, .16); border-radius: 6px; padding: 5px 9px; }
.ch-info-sec.biz { max-width: none; overflow-wrap: anywhere; }
.ch-info-h { font-size: 12.5px; font-weight: 700; color: #8fd0ff; margin-bottom: 2px; }
.ch-info-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 1.5; }
.ch-info-kv span { color: #93aec6; flex: none; }
.ch-info-kv b { color: #eaf4ff; font-weight: 600; text-align: right; }
.ch-info-kv b.up { color: #ff6b6b; }
.ch-info-kv b.down { color: #4cd07d; }
.ch-info-text { font-size: 12px; line-height: 1.55; color: #d8e6f2; }
.ch-info-points-sec { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.ch-info-points { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; padding-right: 6px; }
.ch-info-point { font-size: 12px; line-height: 1.55; }
.ch-info-point-t { color: #ffd633; font-weight: 700; margin-right: 4px; }
.ch-info-point .ch-info-text { display: inline; }
.ch-info-src { margin-top: 5px; font-size: 11.5px; color: #7f9bb3; }

.chart-dialog {
  width: min(1080px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #10293e;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  padding: 14px 16px 12px;
}
.chart-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.chart-title { font-size: 16px; font-weight: 700; color: #fff; }
.chart-code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.chart-sub { font-size: 12.5px; color: rgba(255, 255, 255, .55); }
.chart-head .x { margin-left: auto; }
.chart-legend { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; margin-left: auto; }
.chart-legend .lg { font-size: 12.5px; font-weight: 600; padding-left: 14px; position: relative; }
.chart-legend .lg::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 2px;
}
.chart-legend .lg.up { color: #d32f2f; }
.chart-legend .lg.up::before { background: #d32f2f; }
.chart-legend .lg.down { color: #388e3c; }
.chart-legend .lg.down::before { background: #1b5e20; }
.chart-legend .lg-note { font-size: 11.5px; color: rgba(255, 255, 255, .4); }
.chart-svg { width: 100%; height: 430px; display: block; }
.chart-svg .ax { font-size: 10px; fill: rgba(255, 255, 255, .45); }
/* 最新一分钟柱子顶上的「当前秒数」：白字 + 深色描边，压在红/绿柱子上也看得清 */
.chart-svg .now-sec {
  font-size: 10.5px;
  font-weight: 700;
  fill: rgba(255, 255, 255, .92);
  paint-order: stroke;
  stroke: rgba(0, 0, 0, .55);
  stroke-width: 2.5px;
  stroke-linejoin: round;
  pointer-events: none;
}
/* 全天涨跌色带的小结便签（红/绿分钟数）：放在 9:30–10:00 之间、左右居中 */
.chart-svg .note { font-size: 14px; font-weight: 700; fill: rgba(255, 255, 255, .92); letter-spacing: .3px; }
.chart-svg rect:hover { opacity: .82; }
.chart-foot { margin-top: 8px; font-size: 11.5px; color: rgba(255, 255, 255, .45); line-height: 1.6; }
.st-table-wrap { overflow-x: auto; }
.st-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;              /* 自选表格字号加大一号：13 → 14 */
  white-space: nowrap;
}
.st-table th, .st-table td {
  text-align: right;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.st-table th {
  color: rgba(255, 255, 255, .55);
  font-weight: 600;
  font-size: 12.5px;
  text-align: right;
}
.st-table th:first-child, .st-table td:first-child,
.st-table th:nth-child(2), .st-table td:nth-child(2) { text-align: left; }
.st-table td { color: rgba(255, 255, 255, .88); }
.st-table td.up { color: #d32f2f; }
.st-table td.down { color: #388e3c; }
.st-table .st-mono { font-family: ui-monospace, Consolas, monospace; color: rgba(255, 255, 255, .7); }
.st-table .st-td-empty { text-align: center; color: rgba(255, 255, 255, .45); padding: 22px 10px; }
.st-del2 {
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(220, 80, 80, .18);
  color: #ffb3b3;
  border-radius: 7px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
}
.st-del2:hover { background: rgba(220, 80, 80, .34); color: #fff; }
.st-empty { color: rgba(255, 255, 255, .5); font-size: 13px; padding: 22px 4px; }
.st-card {
    /* 卡里四块（当日成交额 / 差额 / 当日值 / 涨跌%）共用同一个字号。
       1800px 宽（卡宽 206px）实测最大可用 21px，上限就取 21px；随宽度等比缩，窄屏不会挤出界。*/
    --cf: clamp(10px, calc(1.125vw - 5.75px), 14.5px);
  background: rgba(9, 34, 54, .48);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  padding: 9px 11px 10px;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 78px;
  position: relative;
}
.st-card .st-k { font-size: 11.5px; color: rgba(255, 255, 255, .6); padding-right: 16px; }
/* 成交额 + 右边"较昨日此时"的增减 */
.st-card .st-row { display: flex; align-items: baseline; gap: 7px; min-width: 0; flex-wrap: wrap; row-gap: 2px; }
/* 数值 + 右边"较昨日此时"要能并排放下，23px 会把增减挤掉，所以降到 16px */
.st-card .st-v {
  font-size: var(--cf); font-weight: 700; color: #fff;
    flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.st-card .st-v.sm { font-size: var(--cf); font-weight: 600; color: rgba(255, 255, 255, .72); }
/* 卡片右边的「涨跌」（较昨日此时）也统一按当日成交额的字号（16px）；行允许换行，宁可换到第二行也不把数值挤成省略号 */
.st-card .st-d { font-size: var(--cf); font-weight: 600; white-space: nowrap; flex: none; }
.st-card .st-d.up { color: #d32f2f; }      /* 涨：红（A 股习惯） */
.st-card .st-d.down { color: #388e3c; }    /* 跌：绿 */
.st-card .st-d.pending { color: rgba(255, 255, 255, .25); font-weight: 400; }  /* 本地还没攒够"昨天此时" */
.st-card .st-s { font-size: 11.5px; color: rgba(255, 255, 255, .42); }
.st-card .st-l1 { font-size: var(--cf); font-weight: 600; color: rgba(255, 255, 255, .82);
                   white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-card .st-l2, .st-card .st-l3 { display: flex; justify-content: space-between; align-items: baseline;
                   gap: 6px; font-size: var(--cf); white-space: nowrap; min-width: 0; }
.st-card .st-cur { font-size: var(--cf); font-weight: 700; color: #fff; }
.st-card .st-chg { font-size: var(--cf); font-weight: 600; }
.st-card .st-s .st-chg { margin-left: 6px; }
.st-card .st-chg.up { color: #d32f2f; }
.st-card .st-chg.down { color: #388e3c; }
/* 还没接的模块：虚线卡片，一眼看出是占位 */
.st-card.ph { background: rgba(255, 255, 255, .03); border-style: dashed; }
/* 自选标的：左上角一点蓝边，右上角一个删除按钮 */
.st-card.custom { border-left: 3px solid rgba(127, 208, 255, .5); }
.st-del {
  position: absolute; top: 4px; right: 5px;
  border: 0; background: transparent; color: rgba(255, 255, 255, .4);
  font-size: 11px; line-height: 1; padding: 3px 5px; border-radius: 5px; cursor: pointer;
}
.st-del:hover { background: rgba(220, 80, 80, .3); color: #ffb3b3; }
/* 自选添加行 */
.st-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-add input {
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: 0 10px;
  outline: none;
  font-size: 12.5px;
}
.st-add input:focus { border-color: rgba(120, 195, 240, .6); background: rgba(255, 255, 255, .12); }
.st-add .st-code { width: 330px; max-width: 60vw; font-family: ui-monospace, Consolas, monospace; }
.st-add .st-name { width: 150px; }
.st-add .btn { padding: 7px 14px; font-size: 12.5px; }
.st-addmsg { font-size: 11.5px; color: rgba(255, 255, 255, .5); }
/* 页脚：左边数据来源，右边状态（靠右显示） */
.st-foot {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 11.5px; color: rgba(255, 255, 255, .35);
  /* 右边留出「右侧按钮列(150) + 列间距(14) + 纸卡内边距(23)」，
     让右下角的状态文字右边缘与上面自选表格的右边缘对齐 */
  padding-right: 187px;
}
.st-foot .st-status { margin-left: auto; text-align: right; color: rgba(255, 255, 255, .55); }
.st-morning { display: block; margin-top: 4px; color: rgba(255, 255, 255, .5); }

/* 设置 → 分组与标签 → 股市：API Key 输入框 + 自动刷新间隔 */
.stock-cfg { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.stock-cfg .key-row { display: flex; gap: 6px; }
.stock-cfg .key-row input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.stock-cfg .key-row .btn { height: 38px; padding: 0 12px; white-space: nowrap; }
.stock-cfg > .btn { height: 38px; }
.stock-cfg input[type="number"] { -moz-appearance: textfield; }

/* 分时图弹窗：抬到页脚之上（页脚 z-index:1，这里给足），并且比原来大三分之一 */
.chart-overlay { z-index: 300 !important; }
.chart-dialog {
  width: min(1920px, 97vw) !important;
  max-height: 96vh !important;
  /* 纸卡图弹窗不要滚动条：纵向由 flex 按可用高度压缩 SVG；确实放不下时仍可滚动，但不显示滚动条 */
  display: flex;
  flex-direction: column;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chart-dialog::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* 图表弹窗打开时锁住页面滚动：否则背后页面的上下 / 左右滚动条还留在窗口边上 */
html:has(.chart-overlay) { overflow: hidden; }
.chart-dialog > .chart-head { flex: 0 0 auto; }
.chart-dialog > svg { flex: 0 1 auto; min-height: 0; }
/* 图高不再死钉 764：屏幕矮的时候按 96vh 反算，弹窗刚好放得下 —— 否则里面会冒出滚动条。
   （68px = 弹窗上下内边距 + 标题行；留 72 多给 4px 余量）三个弹窗图用同一套，高度才一致 */
.chart-svg, .kline-svg, .breadth-svg { height: min(764px, calc(96vh - 72px)) !important; }
.chart-limits { display: inline-flex; align-items: center; gap: 6px; margin-left: 18px; }
.chart-limits .lb { font-size: 11.5px; color: rgba(255, 255, 255, .5); }
.chart-limits input {
  width: 78px; height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #fff; padding: 0 8px; outline: none; font-size: 12px;
}
.chart-limits input:focus { border-color: rgba(120, 195, 240, .6); background: rgba(255, 255, 255, .12); }
.chart-limits .btn { padding: 4px 10px; font-size: 12px; }

/* 分时图第一行：标题/量程在左，图例和 ✕ 靠右 */
.chart-head { flex-wrap: wrap; }
.chart-head .chart-limits { margin-left: 14px; }
.chart-legend { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; margin-bottom: 0; }
.chart-head .x { margin-left: 12px; }

/* 分时图：十字光标 + 五行情报框 */
.chart-dialog { position: relative; }
.nav-cross line { stroke: rgba(255, 255, 255, .5); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.nav-cross .nav-cross-tag {
  font-size: 11px; fill: #eaf4ff; pointer-events: none;
  paint-order: stroke; stroke: #0b2233; stroke-width: 3px; stroke-linejoin: round;
}
.nav-chart-tip {
  position: absolute; z-index: 6; display: none; pointer-events: none;
  min-width: 168px; padding: 8px 11px;
  background: rgba(9, 30, 47, .97);
  border: 1px solid rgba(120, 195, 240, .55);
  border-radius: 9px;
  box-shadow: 0 10px 26px rgba(0, 6, 16, .55);
  font-size: 12.5px; color: #eaf4ff;
}
.nav-chart-tip.on { display: block; }
.nav-chart-tip .r { display: flex; justify-content: space-between; gap: 14px; line-height: 1.65; }
.nav-chart-tip .r .k { color: rgba(255, 255, 255, .5); }
.nav-chart-tip .r .v { font-variant-numeric: tabular-nums; }
.nav-chart-tip .r:first-child .v { color: #7fe0ff; font-weight: 700; }

/* 悬停「全市场涨跌家数」满 2 秒浮出的涨跌分布直方图（纯 CSS，不发请求） */
.st-card.breadth .st-bd-tip {
  position: absolute; top: calc(100% + 8px); right: 0; width: 748px; max-width: 96vw; z-index: 60;
  background: rgba(9, 30, 47, .98);
  border: 1px solid rgba(120, 195, 240, .45);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 6, 16, .6);
  padding: 15px 18px 12px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s ease, visibility 0s .18s;
}
.st-card.breadth:hover .st-bd-tip { opacity: 1; visibility: visible; transition-delay: 2s, 2s; }
.st-card.breadth .st-bd-tip-k { font-size: 12.5px; color: rgba(255, 255, 255, .68); margin-bottom: 4px; }
.st-card.breadth .st-bd-tip-k i { font-style: normal; font-size: 11.5px; color: rgba(255, 255, 255, .38); }
.st-card.breadth .st-bd-chart { width: 100%; height: 208px; display: block; overflow: visible; }
.st-card.breadth .st-bd-chart text { font-size: 11px; fill: rgba(255, 255, 255, .72); }
.st-card.breadth .st-bd-sum { display: flex; height: 12px; border-radius: 3px; overflow: hidden; margin: 6px 0 7px; background: rgba(255, 255, 255, .04); }
.st-card.breadth .st-bd-sum .up { background: #d32f2f; }
.st-card.breadth .st-bd-sum .flat { background: #cfd8dc; }
.st-card.breadth .st-bd-sum .down { background: #388e3c; }
.st-card.breadth .st-bd-lines { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; flex-wrap: wrap; }
.st-card.breadth .st-bd-lines .up { color: #ff9c9c; }
.st-card.breadth .st-bd-lines .down { color: #a8dcb8; }
.st-card.breadth .st-bd-lines b { color: #fff; font-weight: 700; }

/* 分时图弹窗里的小提示：键盘左右按分钟看 */
.chart-hint { font-size: 12px; color: rgba(255, 255, 255, .38); margin-left: 10px; white-space: nowrap; }

/* 「市场行情」那张表：标题 + 分页 + 可排序列名 */
.mk-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.mk-title { font-size: 15px; font-weight: 700; color: #fff; }
.mk-sub { font-size: 12px; color: rgba(255, 255, 255, .45); }
.mk-refresh { margin-left: auto; }
.mk-th { cursor: pointer; user-select: none; white-space: nowrap; }
.mk-th:hover { color: #fff; }
.mk-th.on { color: #7fd0ff; }
.mk-pager { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.mk-page { color: #fff; font-weight: 600; }
.mk-jump input { width: 62px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .18);
                 color: #fff; border-radius: 6px; padding: 2px 6px; font-size: 12.5px; }

/* 龙虎榜/基金页：榜单切换按钮、基金代码输入、汇总行、超长上榜原因 */
.mk-tabs { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.mk-tabs .btn.ghost.on { color: #7fd0ff; border-color: rgba(127, 208, 255, .55); }
.mk-code { width: 150px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .18);
           color: #fff; border-radius: 6px; padding: 3px 8px; font-size: 12.5px; }
.mk-sum { font-size: 12.5px; color: rgba(255, 255, 255, .62); margin-bottom: 8px; }
.mk-sum b { color: #fff; font-weight: 600; }
.mk-reason { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
             color: rgba(255, 255, 255, .62); }

/* 市场行情的搜索条：靠最右，外观沿用自选的 .st-addbar */
.mk-search { margin-left: auto; margin-right: 8px; }
.mk-search input { width: 240px; }

/* 窄屏：卡片变矮变窄，字号跟着降（必须写在主规则之后才生效） */
@media (max-width: 1240px) { .st-card { --cf: 12px; } }

/* 「站点管理」里新增的「开站日期」：和左边按钮同一行、上下对齐
   （label 横着放，日期框和「＋ 新增用户」按钮都是 38px，父行 align-items:center 一拉就平） */
.add-user-row .field.open-date {
  width: auto; min-width: 0; flex: none;
  flex-direction: row; align-items: center; gap: 8px;
}
.add-user-row .field.open-date > span { font-size: 12px; color: rgba(255, 255, 255, .6); white-space: nowrap; }
.add-user-row .field.open-date .dd { width: 148px; }
.add-user-row .audit-btn { padding: 8px 12px; font-size: 12.5px; white-space: nowrap; }
/* 这一行的按钮统一 38px 高（和输入框 / 日期框一致），上下沿跟开站日期完全对齐 */
.add-user-row .btn {
  height: 38px;
  padding-top: 0; padding-bottom: 0;
  display: inline-flex; align-items: center; justify-content: center;
}

/* 登录记录 / 操作记录弹窗（只读表格，管理员在「站点管理」里打开） */
.audit-overlay { z-index: 145; }
.audit-dialog {
  width: min(1240px, 96vw);
  height: min(760px, 90vh);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.audit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.audit-title { font-size: 16px; font-weight: 700; }
.audit-sub { margin-top: 6px; font-size: 12px; line-height: 1.5; color: rgba(255, 255, 255, .5); }
.audit-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.audit-chips { display: flex; gap: 6px; }
.audit-chips .chip {
  border: 1px solid rgba(255, 255, 255, .14);
  background: transparent;
  color: rgba(255, 255, 255, .65);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
}
.audit-chips .chip:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.audit-chips .chip.on {
  background: rgba(63, 151, 216, .3);
  border-color: rgba(127, 208, 255, .55);
  color: #7fd0ff;
  font-weight: 600;
}
.audit-count { font-size: 12.5px; color: rgba(255, 255, 255, .55); }
.audit-search { margin-left: auto; }
.audit-search input {
  width: 260px; height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(0, 0, 0, .2);
  color: #fff;
  padding: 0 10px;
  outline: none;
  font-size: 12.5px;
}
.audit-search input:focus { border-color: rgba(120, 195, 240, .6); }
.audit-refresh { padding: 6px 12px; font-size: 12.5px; }
.audit-body { flex: 1; min-height: 0; overflow: auto; padding: 0 20px 12px; }
.audit-table { font-size: 12.5px; }
.audit-table th, .audit-table td { padding: 8px 10px; vertical-align: top; }
/* 登录记录：浏览器 / 系统各占一列；整行内容上下居中、不换行（窄屏由弹窗横向滚动兜底） */
.audit-table.login-table { width: max-content; min-width: 100%; }
.audit-table.login-table th,
.audit-table.login-table td {
  vertical-align: middle;
  white-space: nowrap;
}
/* 失败原因跟「失败」标签并排显示在同一行 */
.audit-reason-inline {
  margin-left: 8px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .55);
  white-space: nowrap;
}
.audit-table th { position: sticky; top: 0; background: #14334c; z-index: 1; }
.audit-table .col-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .75);
}
.audit-ip { font-family: Consolas, monospace; white-space: nowrap; }
.audit-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.audit-badge.ok { color: #8ce8b4; background: rgba(80, 220, 140, .12); border: 1px solid rgba(80, 220, 140, .35); }
.audit-badge.fail { color: #ff9d9d; background: rgba(255, 120, 120, .12); border: 1px solid rgba(255, 120, 120, .38); }
.audit-reason { margin-top: 3px; font-size: 11px; line-height: 1.4; color: rgba(255, 255, 255, .45); }
.audit-action { white-space: nowrap; color: #7fd0ff; }
.audit-detail { color: rgba(255, 255, 255, .72); line-height: 1.55; word-break: break-word; }
.audit-empty { text-align: center; padding: 40px 0 !important; color: rgba(255, 255, 255, .4); }
.audit-foot { align-items: center; justify-content: space-between; }

/* 分时图图例：今日 / 昨日 右边的累计成交额 */
.chart-legend .lg b { font-weight: 600; margin-left: 4px; font-variant-numeric: tabular-nums; }
.chart-legend .lg.up b { color: #d32f2f; }
.chart-legend .lg.down b { color: #388e3c; }

/* 分时图图例：昨日右边的增跌比 */
.chart-legend .lg-ratio { font-weight: 600; margin-left: 6px; font-variant-numeric: tabular-nums; }
.chart-legend .lg-ratio.up { color: #d32f2f; }
.chart-legend .lg-ratio.down { color: #388e3c; }
.chart-legend .lg-stale {
  font-size: 11px; font-weight: 500; padding: 2px 6px; border-radius: 8px;
  color: #ffce6b; background: rgba(255, 190, 80, .12);
  border: 1px solid rgba(255, 190, 80, .38); white-space: nowrap;
}

/* 「沪深北合计」卡右侧的五根小柱（近 30/20/10/5/1 分钟动能，红＝正、绿＝负） */
.st-card.sum { padding-right: 56px; }
.st-card.sum .st-bars {
  position: absolute; right: 7px; top: 10px; bottom: 10px; width: 44px;
  padding-left: 5px; border-left: 1px dashed rgba(255, 255, 255, .18);
}
/* 五根柱子以中线为零轴：大于 0 往上（红），小于 0 往下（绿） */
.st-card.sum .st-bars i { position: absolute; width: 6px; min-height: 2px; border-radius: 1px; }
.st-card.sum .st-bars .z { position: absolute; left: 5px; right: 0; top: 50%; height: 1px; background: rgba(255, 255, 255, .25); }

/* 表头可点排序（龙虎榜） */
.st-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.st-table th.sortable:hover { color: #fff; background: rgba(63, 151, 216, .10); }
.st-table th.sorted { color: #7fc4ff; }

/* 分时图弹窗：三种图表切换按钮 / K线图 / 空态 */
.chart-modes { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; }
.chart-modes .btn { height: 26px; padding: 0 12px; font-size: 12.5px; }
.kline-svg { width: 100%; height: 430px; display: block; }
.kline-svg .ax { font-size: 10px; fill: rgba(255, 255, 255, .55); }
.chart-empty { height: 240px; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .55); font-size: 13px; }

/* 图例里的「现价」（今日左边） */
.chart-legend .lg.px { color: #cfe6ff; }
.chart-legend .lg.px::before { background: #8ab4f8; }

/* 涨跌家数弹窗（三张纸卡） */
.breadth-svg { width: 100%; height: 764px; display: block; }
.breadth-svg .ax { font-size: 10.5px; fill: rgba(255, 255, 255, .55); }

/* 涨跌家数弹窗：代码位改显示最新家数；关闭按钮始终贴最右 */
.chart-bh { font-size: 12.5px; color: rgba(255, 255, 255, .62); margin-left: auto; }
.chart-bh b { font-weight: 700; }
.chart-head.bh .x { margin-left: 10px; }

/* 自选标签条（含「＋」新建快照标签）与批量添加上传 */
.st-wtabs { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; }
.st-wtab {
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .72); font-size: 12.5px; padding: 2px 10px;
  border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.st-wtab:hover { background: rgba(255, 255, 255, .12); }
.st-wtab.on { background: rgba(120, 195, 240, .22); border-color: rgba(120, 195, 240, .6); color: #fff; font-weight: 700; }
.st-wtab.add { font-weight: 700; padding: 2px 9px; }
.st-batch { position: relative; cursor: pointer; overflow: hidden; }
.st-batch input[type=file] { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* 自选标签：悬停 2 秒才出现「重命名 / 删除」，避免误点 */
.st-wtab2 {
  display: inline-flex; align-items: center;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .05);
  border-radius: 999px; padding: 2px 8px; font-size: 12.5px; white-space: nowrap;
}
.st-wtab2:hover { background: rgba(255, 255, 255, .12); }
.st-wtab2.on { background: rgba(120, 195, 240, .22); border-color: rgba(120, 195, 240, .6); color: #fff; font-weight: 700; }
.st-wtab2-name { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; padding: 0 2px; }
.st-wtab2-acts {
  display: inline-flex; gap: 1px; opacity: 0; max-width: 0; overflow: hidden; pointer-events: none;
  transition: opacity .15s ease, max-width .15s ease;
}
.st-wtab2:hover .st-wtab2-acts {
  opacity: 1; max-width: 46px; pointer-events: auto;
  transition-delay: 2s, 2s;      /* 悬停满 2 秒才出现 */
}
.st-wtab2-acts button {
  border: 0; background: transparent; color: rgba(255, 255, 255, .72);
  font-size: 12px; line-height: 1; padding: 0 3px; cursor: pointer;
}
.st-wtab2-acts button:hover { color: #fff; }
.st-wtab2-acts button.del:hover { color: #ff8a80; }
.st-wtab-rename {
  width: 96px; font-size: 12.5px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid rgba(120, 195, 240, .7); background: rgba(255, 255, 255, .08); color: #fff;
}

/* 居中确认弹窗（删除标签 / 删除自选） */
.confirm-overlay { z-index: 4000; }
.confirm-card {
  min-width: 300px; max-width: 480px; padding: 18px 20px 16px;
  border-radius: 14px; background: rgba(9, 34, 54, .97);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.confirm-text { font-size: 13.5px; line-height: 1.7; color: #fff; margin-bottom: 16px; }
.confirm-btns { display: flex; justify-content: flex-end; gap: 10px; }

/* 弹窗右上角：黄色「?」——悬停 2 秒显示图例 */
.chart-help { position: relative; display: inline-flex; align-items: center; }
/* 没有图例（日K / 涨跌家数）时，由问号把右侧空白吃掉，它和 ✕ 一起贴最右 */
.chart-head.no-legend .chart-help { margin-left: auto; }
/* 涨跌家数弹窗：右侧空白交给「涨/平/跌/涨停/跌停」那串数字，问号紧跟其后 */
.chart-head.bh.no-legend .chart-help { margin-left: 0; }
.chart-head .chart-help + .x { margin-left: 10px !important; }
.help-q {
  width: 20px; height: 20px; line-height: 18px; padding: 0; border-radius: 50%;
  border: 1px solid #e6b800; background: rgba(230, 184, 0, .15); color: #ffd633;
  font-size: 12.5px; font-weight: 700; cursor: help;
}
.help-q:hover { background: rgba(230, 184, 0, .3); color: #fff3b0; }
.help-tip {
  position: absolute; right: 0; top: 130%; z-index: 50; width: 340px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(6, 26, 42, .97); border: 1px solid rgba(230, 184, 0, .35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  opacity: 0; max-height: 0; overflow: hidden; pointer-events: none;
  transition: opacity .15s ease, max-height .15s ease;
}
.chart-help:hover .help-tip {
  opacity: 1; max-height: 360px; pointer-events: auto;
  transition-delay: 2s, 2s;
}
.help-line { font-size: 12px; line-height: 1.55; color: rgba(255, 255, 255, .82); white-space: normal; }

/* 日K 那行说明现在在头部「?」左边（原来在 SVG 下面单独占一行），太长时允许折行 */
.chart-legend.kline-legend {
  flex-wrap: wrap; gap: 4px 14px; margin: 0 0 0 auto;
}

/* 基金重仓股：刷新按钮左边的「报告期 / 披露日期」 */
.mk-report {
  font-size: 11.5px; color: rgba(255, 255, 255, .5);
  margin-right: 10px; padding-left: 10px; border-left: 1px dashed rgba(255, 255, 255, .18);
}

/* 合计图图例里的涨/跌停家数：深红 / 深绿，和涨跌家数弹窗配色一致 */
.chart-legend .lg.lim-up { color: #c62828; }
.chart-legend .lg.lim-up::before { background: #c62828; }
.chart-legend .lg.lim-down { color: #1b5e20; }
.chart-legend .lg.lim-down::before { background: #1b5e20; }

/* 图例不再随数字长短抖动：每格按"最长现实值"定宽（实测像素），
   内容仍左贴（色块紧贴标签、标签紧贴数字），多余空白留在格尾 */
.chart-legend > span { flex: none; white-space: nowrap; }
.chart-legend .lg b, .chart-legend .lg-ratio { font-variant-numeric: tabular-nums; }
.chart-legend .lg.px     { min-width: 104px; }   /* 现价 9,999.99 */
.chart-legend .lg.cnt    { min-width: 70px;  }   /* 涨 5,377 */
.chart-legend .lg.cnt2   { min-width: 76px;  }   /* 涨停 546 */
.chart-legend .lg.chg    { min-width: 96px;  }   /* 涨跌 −188.42 */
.chart-legend .lg.amt    { min-width: 118px; }   /* 今日 9,279.88 亿 / 1.077 万亿 */
.chart-legend .lg.amtchg { min-width: 126px; }   /* 涨跌 −8,488.34 亿 */
.chart-legend .lg-ratio  { display: inline-block; min-width: 60px; text-align: right; }
.chart-legend .lg b {
  display: inline-block; text-align: right;
  font-variant-numeric: tabular-nums;
}
.chart-legend .lg.px     b { min-width: 5.4em; }   /* 现价 99,999.99 */
.chart-legend .lg.cnt    b { min-width: 3.6em; }   /* 涨 12,693 */
.chart-legend .lg.cnt2   b { min-width: 4.0em; }   /* 涨停 1,119 */
.chart-legend .lg.chg    b { min-width: 5.4em; }   /* 涨跌 −1,888.88 */
.chart-legend .lg.pct    b { min-width: 4.4em; }   /* 涨跌幅 −10.48% */
.chart-legend .lg.amt    b { min-width: 6.2em; }   /* 今日 99,999.99 亿 / 1.077 万亿 */
.chart-legend .lg.amtchg b { min-width: 7.2em; }   /* 涨跌 −11,488.34 亿 */
.chart-legend .lg-ratio {
  display: inline-block; min-width: 5.2em; text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 龙虎榜：查历史日期的输入框 */
.mk-date { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; }
.mk-date-in {
  background: rgba(255, 255, 255, .06); color: #eaf2fb; border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px; padding: 3px 8px; font-size: 12px; font-family: inherit; color-scheme: dark;
}
.mk-date-in:hover { border-color: rgba(255, 255, 255, .3); }
.mk-date-reset { padding: 3px 10px; font-size: 12px; }
