/* 图个乐 · 第一期改版（登录页极简 / 搜索 / 工具栏 / 品牌）
   只做外观与容器，不改业务逻辑 */

/* ---------- 品牌 Logo ---------- */
.zg-brand-logo {
  height: 34px; width: auto; display: block;
  border-radius: 9px;
  background: #fff;
  object-fit: contain;
}
.zg-brand-logo.sq { height: 34px; width: 34px; border-radius: 10px; box-shadow: 0 0 0 1px var(--zg-line), 0 2px 6px rgba(16,24,40,.06); }
.zg-brand-text { font-size: 19px; font-weight: 700; color: var(--zg-navy); letter-spacing: 1px; }

/* 首页搜索缩短 + 右侧工具 */
.zg-search { max-width: 430px !important; }
.zg-tools { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.zg-tools .ant-btn {
  height: 34px !important; padding: 0 11px !important;
  border-radius: 9px !important; font-size: 13px !important;
  color: var(--zg-sub) !important; background: #f7f8fa !important;
  border: 1px solid var(--zg-line) !important;
  line-height: 32px !important;
}
.zg-tools .ant-btn:hover { background: #eef2f8 !important; color: var(--zg-navy) !important; }

/* 分类栏：不依赖原站类名（原站会给每个按钮加 ant-btn-primary + 深蓝底，
   且点击后 zg-cat-on 会被 Vue 换掉），统一按结构压平，只留 zg-pick 高亮 */
.zg-rail .scroll-container .ant-btn,
.zg-rail .scroll-container .ant-btn.ant-btn-primary,
.zg-rail .scroll-container .ant-btn.ant-btn-text,
.zg-rail .scroll-container .ant-btn.zg-cat-on {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #475467 !important;
  font-weight: 400 !important;
  position: relative;
}
.zg-rail .scroll-container .ant-btn::before {
  content: none !important;
  display: none !important;
}
.zg-rail .scroll-container .ant-btn:hover,
.zg-rail .scroll-container .ant-btn.ant-btn-primary:hover {
  background: #f2f5fa !important;
  color: #1a2b45 !important;
}
.zg-rail .scroll-container .ant-btn.zg-pick,
.zg-rail .scroll-container .ant-btn.zg-pick:hover,
.zg-rail .scroll-container .ant-btn.ant-btn-primary.zg-pick {
  background: #e8f0fe !important;
  background-color: #e8f0fe !important;
  color: #1259d6 !important;
  font-weight: 600 !important;
}
.zg-rail .scroll-container .ant-btn.zg-pick::before {
  content: "" !important;
  display: block !important;
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: #1676fd !important;
}
.zg-rail .ant-btn { border-radius: 9px !important; }

/* ---------- 搜索结果面板 ---------- */
.zg-sr {
  position: absolute; z-index: 3000; top: 52px; left: 0;
  width: 560px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid var(--zg-line); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(16,24,40,.14);
  overflow: hidden; display: none;
}
.zg-sr.open { display: block; }
.zg-sr-head {
  padding: 10px 14px; font-size: 12px; color: var(--zg-sub);
  border-bottom: 1px solid var(--zg-line); display: flex; justify-content: space-between;
}
.zg-sr-list { max-height: 380px; overflow: auto; }
.zg-sr-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f6f7f9;
}
.zg-sr-item:last-child { border-bottom: 0; }
.zg-sr-item:hover, .zg-sr-item.on { background: #f4f7fc; }
.zg-sr-item .nm { font-size: 14px; color: var(--zg-ink); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zg-sr-item .nm em { font-style: normal; color: #1676fd; background: #eef4ff; border-radius: 3px; padding: 0 2px; }
.zg-sr-item .cat { font-size: 11.5px; color: var(--zg-sub); background: var(--zg-soft); border-radius: 6px; padding: 2px 7px; flex: 0 0 auto; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zg-sr-item .go { font-size: 11px; color: #98a2b3; flex: 0 0 auto; }
.zg-sr-empty { padding: 26px 14px; text-align: center; color: var(--zg-sub); font-size: 13px; }
.zg-sr-foot { padding: 8px 14px; font-size: 11.5px; color: #98a2b3; border-top: 1px solid var(--zg-line); display: flex; gap: 14px; }

/* ---------- 激活弹窗（胶囊点击） ---------- */
.zg-modal-mask {
  position: fixed; inset: 0; z-index: 2147483500;
  background: rgba(12,18,32,.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.zg-modal {
  width: 100%; max-width: 400px; background: #fff; border-radius: 16px;
  padding: 26px 24px 20px; box-shadow: 0 24px 70px rgba(0,0,0,.3);
  box-sizing: border-box;
}
.zg-modal h3 { margin: 0 0 6px; font-size: 18px; color: var(--zg-ink); }
.zg-modal p { margin: 0 0 16px; font-size: 13px; color: var(--zg-sub); line-height: 1.6; }
.zg-modal input {
  width: 100%; height: 46px; border: 1px solid #e4e7ec; border-radius: 10px;
  padding: 0 13px; font-size: 15px; box-sizing: border-box; outline: 0; background: #fafbfc;
}
.zg-modal input:focus { border-color: #12203a; background: #fff; box-shadow: 0 0 0 4px rgba(18,32,58,.06); }
.zg-modal .btns { display: flex; gap: 10px; margin-top: 14px; }
.zg-modal .btn {
  flex: 1; height: 44px; border-radius: 10px; border: 1px solid #e4e7ec;
  background: #fff; color: #344054; font-size: 14px; cursor: pointer;
}
.zg-modal .btn.primary { background: #12203a; color: #fff; border-color: #12203a; font-weight: 600; }
.zg-modal .btn.primary:disabled { opacity: .6; }
.zg-modal .msg { font-size: 12.5px; min-height: 18px; margin-top: 10px; color: var(--zg-sub); }

/* 授权胶囊可点 */
.zg-license { cursor: pointer; transition: background .15s; }
.zg-license:hover { background: #f2f5fa; }
.zg-license .zg-lic-renew { margin-left: 8px; color: #1676fd; font-weight: 600; }

/* ---------- 客服（头像菜单内） ---------- */
.zg-dd-sec { border-top: 1px solid var(--zg-line); margin-top: 6px; padding-top: 8px; }
.zg-dd-sec-t { font-size: 11px; color: #98a2b3; padding: 2px 12px 6px; letter-spacing: .5px; }
.zg-dd-sup {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; cursor: pointer; font-size: 13.5px; color: var(--zg-ink);
}
.zg-dd-sup:hover { background: #f4f7fc; }
.zg-dd-sup svg { width: 18px; height: 18px; flex: 0 0 auto; }
.zg-dd-sup small { display: block; font-size: 11px; color: var(--zg-sub); margin-top: 1px; }
.zg-dd-sup .cpc { margin-left: auto; font-size: 10.5px; color: #98a2b3; }

/* ---------- 登录页（极简） ---------- */
body.zg-login { background: #f7f8fa !important; }
body.zg-login::before { display: none !important; }
body.zg-login #app, 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::after {
  content: ""; position: fixed; inset: 0; background: #f7f8fa; z-index: 1; pointer-events: none;
}
body.zg-login .login-right {
  position: fixed !important;
  top: 50% !important; left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 404px !important; max-width: calc(100vw - 32px) !important;
  height: auto !important;
  background: #fff !important;
  border: 1px solid #eceff3 !important;
  border-radius: 18px !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 16px 40px rgba(16,24,40,.06) !important;
  padding: 26px 26px 18px !important;
  box-sizing: border-box !important;
  z-index: 30 !important;
  max-height: calc(100vh - 36px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
body.zg-login .login-right * { max-width: 100%; }
body.zg-login .login-right .ant-input { width: 100% !important; }

/* 输入框加高、圆角、细边框 */
body.zg-login .login-right input.ant-input {
  height: 46px !important; border-radius: 10px !important;
  border: 1px solid #e4e7ec !important; background: #fafbfc !important;
  font-size: 14.5px !important; padding: 0 13px !important;
  box-sizing: border-box;
}
body.zg-login .login-right input.ant-input:focus {
  border-color: #12203a !important; background: #fff !important;
  box-shadow: 0 0 0 4px rgba(18,32,58,.06) !important;
}
body.zg-login .login-right .ant-btn { border-radius: 10px !important; height: 42px !important; }
body.zg-login .login-right .ant-btn-primary,
body.zg-login .login-right .ant-btn-background-ghost {
  background: #12203a !important; border-color: #12203a !important; color: #fff !important;
}

/* 激活码输入框 */
.zg-code-field { margin-top: 10px; }
.zg-code-field .lbl {
  font-size: 12px; color: var(--zg-sub); margin: 0 0 6px 2px;
  display: flex; align-items: center; gap: 6px;
}
.zg-code-field .lbl i { font-style: normal; color: #98a2b3; font-size: 11px; }
.zg-code-field input {
  width: 100%; height: 46px; border: 1px solid #e4e7ec; border-radius: 10px;
  padding: 0 13px; font-size: 14.5px; box-sizing: border-box;
  outline: 0; background: #fafbfc; color: var(--zg-ink);
  letter-spacing: .5px;
}
.zg-code-field input:focus { border-color: #12203a; background: #fff; box-shadow: 0 0 0 4px rgba(18,32,58,.06); }
.zg-code-field .hint { font-size: 11.5px; color: #98a2b3; margin-top: 6px; padding-left: 2px; }
.zg-code-field .hint.warn { color: #b54708; }

.zg-login-foot { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.zg-login-foot .lnk { font-size: 12.5px; color: #475467; cursor: pointer; }
.zg-login-foot .lnk:hover { color: #12203a; }
body.zg-login .zg-lang-pill { margin: 8px auto 0; display: flex; justify-content: center; gap: 6px; position: static !important; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; }
body.zg-login .zg-lang-pill button {
  height: 26px !important; padding: 0 10px !important; line-height: 24px !important;
  border: 1px solid #e4e7ec !important; border-radius: 8px !important;
  background: #fff !important; color: #667085 !important;
  font-size: 12px !important; box-shadow: none !important; outline: 0;
}
body.zg-login .zg-lang-pill button.on {
  background: #f2f5fa !important; border-color: #d6deea !important;
  color: #12203a !important; font-weight: 600 !important;
}
body.zg-login #__langSwitchBtn { display: none !important; }

/* 代理申请入口：原样式只在点开弹窗时才注入，未点击前是浏览器默认按钮（灰底黑框），这里兜底 */
.agApplyLink {
  display: inline-block !important;
  width: 100%; margin-top: 6px; padding: 4px;
  text-align: center; font-size: 12.5px; line-height: 1.6;
  color: #5a6478 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0;
  cursor: pointer;
  font-family: inherit;
}
.agApplyLink b { color: #1d3f8f; font-weight: 600; }

/* 登录卡头部（原来没有基础样式，撑到 218px 高，收紧成极简三行） */
body.zg-login .zg-login-head { text-align: center; margin: 0 0 16px; }
body.zg-login .zg-login-head .badge {
  width: 76px; height: 76px; margin: 0 auto 10px;
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 8px 22px rgba(16,24,40,.10);
}
body.zg-login .zg-login-head .badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.zg-login .zg-login-head .nm { font-size: 20px; font-weight: 700; color: #12203a; letter-spacing: .5px; }
body.zg-login .zg-login-head .sub { font-size: 12.5px; color: #667085; margin-top: 4px; }

/* 底部：清掉免责声明后不再预留高度 */
body.zg-login .zg-login-card .ant-checkbox-wrapper { font-size: 12.5px !important; }

/* ---------- 移动端 ---------- */
@media (max-width: 820px) {
  .zg-search { max-width: none !important; }
  .zg-brand-logo.sq { width: 42px; height: 42px; border-radius: 11px; }
  .zg-tools { grid-column: 2; grid-row: 1; justify-self: end; }
  .zg-tools .ant-btn { height: 30px !important; line-height: 28px !important; padding: 0 9px !important; font-size: 12px !important; }
  .zg-sr { position: fixed; top: 12vh; left: 16px; right: 16px; width: auto; max-width: none; top: 90px; }
  .zg-sr-list { max-height: 62vh; }
  body.zg-login { padding: 0 !important; }
  body.zg-login .zg-login-card:has(> .login-right),
  body.zg-login .zg-login-card-holder { width: calc(100vw - 32px) !important; padding: 24px 20px 18px !important; }
  .zg-login-head .badge { width: 66px; height: 66px; border-radius: 17px; }
}
