/* 图个乐 · 视觉改版 v2（2026-11-30）
   只做外观与容器重排，不改任何业务逻辑 */
:root {
  --zg-bg: #f5f6f8;
  --zg-card: #ffffff;
  --zg-ink: #101828;
  --zg-sub: #667085;
  --zg-line: #eceff3;
  --zg-navy: #12203a;
  --zg-navy-2: #1c2f52;
  --zg-gold: #c9a227;
  --zg-soft: #f2f4f7;
  --zg-radius: 14px;
}

html, body { background: var(--zg-bg) !important; }
body { color: var(--zg-ink); }
body.zg-v2 { padding-top: 0; }

/* ---------- 顶部公告跑马灯 ---------- */
.zg-marquee {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  background: linear-gradient(90deg, #12203a, #1c2f52);
  color: #fff;
  overflow: hidden;
  font-size: 13px;
  letter-spacing: .2px;
}
.zg-marquee .zg-mq-dot {
  flex: 0 0 auto;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--zg-gold);
  box-shadow: 0 0 0 4px rgba(201,162,39,.18);
}
.zg-marquee .zg-mq-view { position: relative; flex: 1 1 auto; height: 36px; overflow: hidden; }
.zg-marquee .zg-mq-track {
  position: absolute; top: 0; left: 0; height: 36px;
  white-space: nowrap; display: flex; align-items: center;
  will-change: transform;
  animation: zg-scroll linear infinite;
}
.zg-marquee .zg-mq-track a { color: #fff; text-decoration: none; }
.zg-marquee .zg-mq-track a:hover { color: var(--zg-gold); }
.zg-marquee .zg-mq-sep { padding: 0 26px; color: rgba(255,255,255,.35); }
.zg-marquee .zg-mq-close {
  flex: 0 0 auto; border: 0; background: transparent; color: rgba(255,255,255,.65);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 4px 2px;
}
.zg-marquee .zg-mq-close:hover { color: #fff; }
@keyframes zg-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 头部白卡 ---------- */
.zg-header {
  margin: 0 !important;
  padding: 18px 22px !important;
  background: var(--zg-card);
  border-radius: var(--zg-radius);
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.035);
  border: 1px solid var(--zg-line);
  width: auto !important;
  margin-top: 14px !important;
  align-items: center !important;
  gap: 18px;
  box-sizing: border-box;
}
.zg-header > .flex:first-child {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 1 1 auto;
  min-width: 0;
}

/* 品牌位 */
.zg-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.zg-brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(145deg, #12203a, #27406e);
  display: flex; align-items: center; justify-content: center;
  color: var(--zg-gold); font-size: 17px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(18,32,58,.22);
  letter-spacing: 0;
}
.zg-brand-name { font-size: 19px; font-weight: 700; color: var(--zg-navy); letter-spacing: 1px; }
.zg-brand-name em { font-style: normal; color: var(--zg-gold); }

/* 倒计时/统计行替换为授权胶囊 */
.zg-license {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--zg-soft); color: var(--zg-sub);
  font-size: 12.5px; white-space: nowrap;
  border: 1px solid var(--zg-line);
}
.zg-license b { color: var(--zg-navy); font-weight: 600; }
.zg-license .zg-lic-dot { width: 6px; height: 6px; border-radius: 50%; background: #12b76a; }
.zg-license.is-warn .zg-lic-dot { background: #f79009; }
.zg-license.is-off .zg-lic-dot { background: #98a2b3; }

/* 迁移提示原样式弱化 */
.zg-hint { color: var(--zg-sub) !important; font-size: 12px !important; margin-top: 8px !important; opacity: .85; }

/* 大搜索框 */
.zg-search {
  display: flex; align-items: center; gap: 10px;
  flex: 1 1 420px; min-width: 240px; max-width: none;
  height: 44px; padding: 0 14px; margin-left: 6px;
  background: #fbfcfd; border: 1px solid #e6e9ef; border-radius: 12px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.zg-search:focus-within {
  background: #fff; border-color: #c9d3e4; box-shadow: 0 0 0 4px rgba(18,32,58,.05);
}
.zg-search svg { flex: 0 0 auto; color: #98a2b3; }
.zg-search input {
  flex: 1 1 auto; border: 0; outline: 0; background: transparent;
  font-size: 14.5px; color: var(--zg-ink); min-width: 0;
}
.zg-search input::placeholder { color: #98a2b3; }
.zg-search kbd {
  flex: 0 0 auto; font-family: inherit; font-size: 11px; color: #98a2b3;
  border: 1px solid var(--zg-line); border-radius: 6px; padding: 2px 6px; background: #fff;
}

/* 右上：头像 + 下拉 */
.zg-usermenu { position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.zg-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(150deg, #12203a, #2b4470);
  color: #fff; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 0; position: relative;
  box-shadow: 0 4px 12px rgba(18,32,58,.18);
}
.zg-avatar:hover { filter: brightness(1.08); }
.zg-avatar .zg-caret { font-size: 10px; margin-left: 3px; opacity: .8; }
.zg-dropdown {
  position: absolute; right: 0; top: 48px; z-index: 2147482000;
  width: 232px; padding: 8px;
  background: #fff; border: 1px solid var(--zg-line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16,24,40,.14);
  display: none;
}
.zg-dropdown.open { display: block; }
.zg-dd-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--zg-line); margin-bottom: 6px; }
.zg-dd-name { font-size: 14px; font-weight: 600; color: var(--zg-ink); }
.zg-dd-meta { font-size: 12px; color: var(--zg-sub); margin-top: 3px; }
.zg-dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: #344054; user-select: none;
}
.zg-dd-item:hover { background: var(--zg-soft); color: var(--zg-navy); }
.zg-dd-item .ico { width: 18px; text-align: center; opacity: .85; }
.zg-dd-sep { height: 1px; background: var(--zg-line); margin: 6px 4px; }

/* ---------- 主体：左侧分类 + 右侧网格 ---------- */
.zg-layout { padding: 14px 18px 0 !important; box-sizing: border-box; }
/* 底部说明条不遮挡网格 */
.zg-grid-wrap { padding-bottom: 8px; }
.zg-rail {
  background: var(--zg-card);
  border: 1px solid var(--zg-line);
  border-radius: var(--zg-radius);
  padding: 10px 8px !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
  height: calc(100vh - 190px);
  overflow: hidden;
  box-sizing: border-box;
  width: 186px !important;
}
.zg-rail > div:first-child { padding: 0 4px 8px !important; }
.zg-rail .ant-btn-primary {
  background: var(--zg-navy) !important;
  border-color: var(--zg-navy) !important;
  border-radius: 10px !important;
  font-weight: 600;
  box-shadow: none !important;
}
.zg-rail .scroll-container { max-height: calc(100vh - 260px) !important; padding: 0 2px; }
.zg-rail .scroll-container > div { margin-top: 2px !important; }
.zg-rail .scroll-container .ant-btn {
  justify-content: flex-start !important;
  text-align: left !important;
  border-radius: 9px !important;
  font-size: 13.5px !important;
  padding-left: 12px !important;
  height: 38px !important;
  line-height: 38px !important;
  color: #475467 !important;
  position: relative;
  overflow: hidden;
}
.zg-rail .scroll-container .ant-btn:hover { background: #f8f9fb !important; }
.zg-rail .scroll-container .ant-btn.zg-cat-on {
  background: var(--zg-soft) !important;
  color: var(--zg-navy) !important;
  font-weight: 600;
}
.zg-rail .scroll-container .ant-btn.zg-cat-on::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--zg-navy);
}
.zg-rail::-webkit-scrollbar, .zg-rail .scroll-container::-webkit-scrollbar { width: 6px; }
.zg-rail .scroll-container::-webkit-scrollbar-thumb { background: #e4e7ec; border-radius: 6px; }

.zg-grid-wrap { padding: 0 0 0 14px !important; }
.zg-grid {
  background: var(--zg-card);
  margin-bottom: 46px;
  padding-bottom: 24px !important;
  height: calc(100% - 48px) !important;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--zg-line);
  border-radius: var(--zg-radius);
  padding: 18px !important;
  min-height: 320px;
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
  box-sizing: border-box;
}
.zg-grid > div[style*="height: 4px"] { display: none !important; }
.zg-grid .itme {
  margin: 0 0 16px 16px !important;
  padding: 6px 4px 4px;
  height: 88px !important;
  border: 1px solid #eef1f5 !important;
  border-radius: 12px !important;
  background: #fff;
  transition: box-shadow .18s, transform .18s, border-color .18s;
  font-size: 13px;
  color: #344054;
  overflow: hidden;
}
.zg-grid .itme:hover {
  border-color: #dfe5ee !important;
  box-shadow: 0 8px 20px rgba(16,24,40,.08);
  transform: translateY(-1px);
}
.zg-grid .itmeImage { border-radius: 10px; overflow: hidden; }
.zg-grid .itmeImage img { border-radius: 9px; width: 34px !important; height: 34px !important; }

/* 底部说明条：独立白色栏，不再半透明压住网格 */
.zg-legal {
  background: #fff !important;
  border-top: 1px solid var(--zg-line);
  box-shadow: 0 -2px 10px rgba(16,24,40,.04);
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 46px !important;
  z-index: 30;
}

/* ---------- 客服浮标 ---------- */
.zg-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 2147483200;
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(150deg, #12203a, #27406e);
  color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 0;
  box-shadow: 0 10px 26px rgba(18,32,58,.28);
  transition: transform .16s;
}
.zg-fab:hover { transform: translateY(-2px); }
.zg-fab svg { width: 22px; height: 22px; }
.zg-fab-panel {
  position: fixed; right: 22px; bottom: 82px; z-index: 2147483200;
  width: 248px; padding: 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--zg-line);
  box-shadow: 0 18px 40px rgba(16,24,40,.18);
  display: none;
}
.zg-fab-panel.open { display: block; }
.zg-fab-panel h4 { margin: 0 0 4px; font-size: 14px; color: var(--zg-ink); }
.zg-fab-panel p { margin: 0 0 12px; font-size: 12px; color: var(--zg-sub); }
.zg-fab-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; text-decoration: none;
  border: 1px solid var(--zg-line); margin-bottom: 8px;
  color: var(--zg-ink); font-size: 13px; background: #fbfcfd;
}
.zg-fab-link:hover { background: var(--zg-soft); border-color: #dfe5ee; }
.zg-fab-link .ico { width: 20px; text-align: center; }
.zg-fab-link small { display: block; color: var(--zg-sub); font-size: 11px; margin-top: 2px; }

/* ---------- 设置弹层里的账号区块 ---------- */
.zg-set-block { margin-top: 18px; border-top: 1px solid var(--zg-line); padding-top: 16px; }
.zg-set-title { font-size: 14px; font-weight: 600; color: var(--zg-ink); margin-bottom: 10px; }
.zg-set-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 9px 0; font-size: 13.5px; color: #344054;
}
.zg-set-row + .zg-set-row { border-top: 1px dashed #f0f2f5; }
.zg-set-row .val { color: var(--zg-sub); font-size: 13px; }
.zg-set-row .val b { color: var(--zg-ink); font-weight: 600; }
.zg-set-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.zg-btn {
  height: 34px; padding: 0 14px; border-radius: 9px; cursor: pointer;
  font-size: 13px; border: 1px solid #e4e7ec; background: #fff; color: #344054;
}
.zg-btn:hover { border-color: #cfd6e2; background: #fbfcfd; }
.zg-btn.primary { background: var(--zg-navy); border-color: var(--zg-navy); color: #fff; }
.zg-btn.primary:hover { filter: brightness(1.1); background: var(--zg-navy); }
.zg-btn.danger { color: #b42318; border-color: #f3d6d2; }
.zg-lang-pill { display: inline-flex; border: 1px solid #e4e7ec; border-radius: 9px; overflow: hidden; }
.zg-lang-pill button {
  height: 32px; padding: 0 14px; border: 0; background: #fff; cursor: pointer;
  font-size: 13px; color: #667085;
}
.zg-lang-pill button.on { background: var(--zg-navy); color: #fff; }
.zg-code-row { display: flex; gap: 8px; margin-top: 10px; }
.zg-code-row input {
  flex: 1 1 auto; height: 36px; border: 1px solid #e4e7ec; border-radius: 9px;
  padding: 0 12px; font-size: 13.5px; outline: 0; min-width: 0;
}
.zg-code-row input:focus { border-color: #c9d3e4; box-shadow: 0 0 0 4px rgba(18,32,58,.05); }
.zg-set-msg { font-size: 12.5px; margin-top: 8px; min-height: 16px; color: var(--zg-sub); }

/* ---------- 登录页（双栏品牌风） ---------- */
body.zg-login { background: #0d1730 !important; }
body.zg-login #app > div,
body.zg-login .main { background: transparent !important; }
/* 原来的风景背景图隐藏，换成深蓝金渐变 */
body.zg-login .main + div, body.zg-login img.zg-bg-hide { display: none !important; }
body.zg-login::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% 8%, rgba(201,162,39,.16), transparent 60%),
    radial-gradient(800px 520px at 88% 92%, rgba(60,104,180,.28), transparent 62%),
    linear-gradient(160deg, #0b1428 0%, #12203a 52%, #16233d 100%);
}
body.zg-login #app { position: relative; z-index: 2; }
.zg-login-card {
  border-radius: 18px !important;
  box-shadow: 0 30px 80px rgba(3,8,20,.55) !important;
  overflow: hidden;
  border: 1px solid rgba(201,162,39,.22);
}
.zg-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.zg-login-brand .zg-brand-mark { width: 30px; height: 30px; font-size: 15px; border-radius: 9px; }
.zg-login-brand .zg-brand-name { color: var(--zg-navy); font-size: 18px; }
.zg-login-sub { font-size: 12.5px; color: var(--zg-sub); margin: 2px 0 14px; }
.zg-hide { display: none !important; }

/* 语言切换旧浮动按钮隐藏（入口移到设置页/登录卡片） */
#__langSwitchBtn { display: none !important; }
/* 旧版客服徽标（配置为空时会渲染成“客服:undefined”）不再显示，改由后台客服浮标接管 */
#__csBadge, a[href="undefined"], a[href$="/undefined"] { display: none !important; }

/* ---------- 移动端 ---------- */
@media (max-width: 820px) {
  html, body { overflow-x: hidden !important; }
  div.flex.zg-header.zg-header {
    display: grid !important;
    grid-template-columns: 1fr auto auto;
    grid-auto-rows: min-content;
    gap: 8px 10px;
    margin: 0 !important;
    padding: 12px 14px !important;
    align-items: center !important;
  }
  div.zg-origin-left.zg-origin-left { display: none !important; }
  .zg-brand { grid-column: 1; grid-row: 1; min-width: 0; overflow: hidden; }
  .zg-brand-mark { width: 28px; height: 28px; font-size: 14px; border-radius: 8px; }
  .zg-brand-name { font-size: 16px; }
  .zg-tools { grid-column: 2; grid-row: 1; justify-self: end; gap: 4px; height: 32px; }
  .zg-tools .ant-btn { height: 30px !important; padding: 0 9px !important; font-size: 12px !important; }
  .zg-usermenu { grid-column: 3; grid-row: 1; justify-self: end; }
  .zg-avatar { width: 32px; height: 32px; font-size: 13px; }
  .zg-license { grid-column: 1 / -1; grid-row: 2; justify-self: start; height: 26px; font-size: 11.5px; }
  .zg-search { grid-column: 1 / -1; grid-row: 3; height: 40px; margin: 0; max-width: none; }
  .zg-search kbd { display: none; }
  .zg-layout { padding: 10px !important; }
  .zg-rail { width: 120px !important; height: calc(100vh - 220px); padding: 8px 6px !important; }
  .zg-rail .scroll-container { max-height: calc(100vh - 280px) !important; }
  .zg-rail .scroll-container .ant-btn { height: 34px !important; line-height: 34px !important; font-size: 12.5px !important; padding-left: 9px !important; }
  .zg-grid-wrap { padding-left: 8px !important; }
  .zg-grid { padding: 10px !important; margin-bottom: 46px; }
  .zg-grid .itme { width: calc(25% - 11px) !important; margin: 0 0 9px 9px !important; height: 76px !important; font-size: 11.5px; }
  .zg-grid .itmeImage img { width: 28px !important; height: 28px !important; }
  .zg-marquee { height: 32px; font-size: 12px; padding: 0 10px; gap: 8px; }
  .zg-marquee .zg-mq-view, .zg-marquee .zg-mq-track { height: 32px; }
  .zg-fab { right: 12px; bottom: 58px; width: 44px; height: 44px; }
  .zg-fab-panel { right: 12px; bottom: 108px; width: calc(100vw - 24px); }
  .zg-dropdown { width: 210px; right: 0; top: 40px; }
}
@media (max-width: 420px) {
  .zg-rail { width: 104px !important; }
  .zg-grid .itme { height: 72px !important; font-size: 11px; }
}

/* ===== 1219：卡片悬停文字消失（图5） =====
   原站规则 .itme[data-v-451c1fd0]:hover{color:#fff} 在浅色卡底上等于把字刷没了，
   这里把悬停态文字压回深色。只加这一条，原规则不动。 */
.main.zg-grid > .itme[data-v-451c1fd0]:hover,
.main.zg-grid > .itme:hover,
.main.zg-grid > .itme:hover span,
.main.zg-grid > .itme:hover .itmeName { color:#344054 !important; }
