/* ============================================================
   数智新匠工具箱 · 主题层
   - 仅定义 浅色(light) 与 马卡龙(macaron) 两套调色板。
   - 深色(dark) 沿用各页面自带的 :root，作为默认值与离线兜底，
     因此本文件不定义 [data-theme="dark"]。
   - 所有页面都通过 var(--xxx) 引用这些语义变量。
   ============================================================ */

/* ---------- 浅色主题 ---------- */
html[data-theme="light"] {
  --bg:      #eef1f7;
  --panel:   #ffffff;
  --panel-2: #f3f6fb;
  --panel2:  #f4f7fc;
  --line:    #dbe1ec;
  --fg:      #1d2533;
  --txt:     #1d2533;
  --sub:     #697489;
  --accent:  #3b6cf6;
  --accent2: #7c5cf6;
  --ok:      #15a34a;
  --warn:    #d98315;
  --ext:     #e8651e;
  --bad:     #dc2626;
  --danger:  #dc2626;
}

/* ---------- 马卡龙主题（柔彩奶油风） ---------- */
html[data-theme="macaron"] {
  --bg:      #fdeef4;
  --panel:   #ffffff;
  --panel-2: #fbeaf2;
  --panel2:  #fff5fa;
  --line:    #f3d7e4;
  --fg:      #4a3545;
  --txt:     #4a3545;
  --sub:     #9c7d8e;
  --accent:  #e25c9c;
  --accent2: #8b5cf6;
  --ok:      #3fb98a;
  --warn:    #e89a3c;
  --ext:     #ff8a5c;
  --bad:     #e85d8a;
  --danger:  #e85d8a;
}

/* ============================================================
   浮动主题切换器（自身配色固定，保证在任意主题下都可见）
   ============================================================ */
.tb-theme-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 10000;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(28,30,40,.92); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.32);
  transition: transform .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.tb-theme-fab:hover { transform: scale(1.07); }
.tb-theme-fab:active { transform: scale(.96); }

.tb-theme-menu {
  position: fixed; right: 18px; bottom: 74px; z-index: 10000;
  background: #ffffff; color: #222;
  border: 1px solid #e3e6ee; border-radius: 14px;
  padding: 8px; display: none;
  flex-direction: column; gap: 4px; min-width: 148px;
  box-shadow: 0 14px 40px rgba(0,0,0,.28);
}
.tb-theme-menu.show { display: flex; }
.tb-theme-menu button {
  display: flex; align-items: center; gap: 9px;
  width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 9px;
  padding: 9px 11px; cursor: pointer; font-size: 13px; color: #333;
  font-family: inherit; transition: background .12s ease;
}
.tb-theme-menu button:hover { background: #f3f4f8; }
.tb-theme-menu button .dot {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.tb-theme-menu button .name { flex: 1; }
.tb-theme-menu button.active { background: #eef2ff; color: #3b5bdb; font-weight: 600; }
.tb-theme-menu button.active .check { opacity: 1; }
.tb-theme-menu button .check { opacity: 0; margin-left: auto; font-size: 12px; }

/* 通用隐藏：账号管理页里「使用记录 / 密码 / 院校编辑」等默认藏入账号卡内，
   点击对应按钮后由弹窗移出显示（修复之前 class="hidden" 无样式导致直接外泄的问题） */
.hidden { display: none !important; }
