/* 认证中心样式：单文件、无外部依赖，双击 / 离线也能正常显示。
   分区：①基础 ②卡片与排版 ③表单与按钮 ④表格与标签 ⑤首页（登录后落地页，仅 .page-home 生效） */

/* ① 基础 */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1b2333;
  --muted: #6b7488;
  --line: #e3e7f0;
  --brand: #2f5bff;
  --brand-ink: #ffffff;
  --ok-bg: #e8f7ee;
  --ok-ink: #137a3d;
  --off-bg: #f1f2f5;
  --off-ink: #6b7488;
  --warn-bg: #fff7e6;
  --warn-ink: #8a5a00;
  --danger: #c62d42;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
code { font-family: Consolas, "SFMono-Regular", monospace; font-size: 13px; }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 40px 20px 24px; flex: 1; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 16px 0 24px; }

/* ② 卡片与排版 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(20, 30, 60, .04);
}
.card.narrow { max-width: 420px; margin: 40px auto 16px; padding: 30px 28px; }
.card.accent { border-color: #c9d6ff; background: #f7f9ff; }
.card.center { text-align: center; }
.brand { font-size: 24px; margin: 0 0 4px; letter-spacing: .5px; }
.title { font-size: 20px; margin: 0 0 4px; }
.title.sm { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.sub { color: var(--muted); margin: 0 0 14px; font-size: 13.5px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.gap { gap: 10px; }
.grow { flex: 1; }

.alert { border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; font-size: 13.5px;
         background: #fdecef; color: var(--danger); }
.alert.ok { background: var(--ok-bg); color: var(--ok-ink); }
.alert.warn { background: var(--warn-bg); color: var(--warn-ink); }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted);
           font-size: 12px; margin: 20px 0 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ③ 表单与按钮 */
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.field input, .copy {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; background: #fbfcff; color: var(--ink); outline: none;
}
.field input:focus { border-color: var(--brand); background: #fff; }
.check { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted);
         margin: 2px 0 16px; }

.btn {
  display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink); font-size: 14px; cursor: pointer; text-decoration: none;
  text-align: center; white-space: nowrap;
}
.btn:hover { border-color: #c4cbdd; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: #2449d6; border-color: #2449d6; }
.btn-ghost { background: transparent; }
.btn-block { display: block; width: 100%; padding: 11px 16px; }

/* ④ 表格与标签 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px;
       background: var(--off-bg); color: var(--off-ink); }
.tag.ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag.off { background: var(--off-bg); color: var(--off-ink); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { display: inline; }
.link { border: 0; background: none; padding: 0; font-size: 13px; color: var(--brand); cursor: pointer; }
.link.danger { color: var(--danger); }
.kv { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 4px 0 18px; }
.kv-row { display: flex; justify-content: space-between; padding: 10px 12px; font-size: 13.5px; }
.kv-row + .kv-row { border-top: 1px solid var(--line); }
.kv-row span { color: var(--muted); }

/* ⑤ 首页（登录后落地页）
   视觉依据 2026-12-05 用户效果图：浅蓝渐变底 + 柔光色块 / 白卡低对比边框 / 五列系统宫格。
   ⚠️ 只作用于首页：全部规则挂在 .page-home 下，登录页与管理页的既有观感不受影响 */
.page-home {
  background: linear-gradient(162deg, #e6f0ff 0%, #eff6ff 44%, #f8fbff 100%);
  color: #16233d;
}
/* 首页要通栏，取消 base 的 960px 窄容器与默认页脚 */
.page-home .wrap { max-width: none; padding: 0; }
.page-home .foot { display: none; }
/* 两团柔光色块（左上 / 右下）：纯装饰，固定定位不参与布局，也不挡点击 */
.page-home::before,
.page-home::after {
  content: ""; position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
}
.page-home::before {
  width: 680px; height: 680px; left: -300px; top: -340px;
  background: radial-gradient(circle, rgba(122, 167, 255, .30), rgba(122, 167, 255, 0) 68%);
}
.page-home::after {
  width: 560px; height: 560px; right: -220px; bottom: -260px;
  background: radial-gradient(circle, rgba(122, 167, 255, .24), rgba(122, 167, 255, 0) 70%);
}

.home-shell {
  position: relative; z-index: 1;
  /* 1400px：五列卡片时域名（xundian.connectbilian.com）能完整显示，不被截成省略号 */
  width: 100%; max-width: 1400px; margin: 0 auto; padding: 30px 44px 34px;
}

/* —— 顶栏：左侧品牌，右侧账号菜单 —— */
.sso-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sso-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark { width: 44px; height: 48px; display: block; flex: none; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 22px; letter-spacing: .5px; }
.brand-text span { font-size: 11.5px; color: #8b9ab6; letter-spacing: 2.4px; text-transform: uppercase; }

.user-menu { position: relative; }
.user-menu > summary {
  display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  padding: 5px 6px 5px 5px; border-radius: 999px; border: 1px solid transparent;
}
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover { background: rgba(255, 255, 255, .7); border-color: #dfe8fa; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: #dfeaff; color: #2f6bff; border: 1px solid #d3e2ff;
}
.avatar svg { width: 22px; height: 22px; }
.user-menu .chev { width: 16px; height: 16px; color: #7b8aa6; }
.user-pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; z-index: 20;
  background: #fff; border: 1px solid #e3ebf9; border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 12px 30px rgba(28, 48, 96, .12);
  display: flex; flex-direction: column; gap: 6px; font-size: 13px;
}
.user-pop b { font-size: 14px; }
.user-pop span { color: var(--muted); font-size: 12px; }
.user-pop a { color: var(--brand); text-decoration: none; padding-top: 6px; border-top: 1px solid var(--line); }
.user-pop a:hover { text-decoration: underline; }

/* 绑定成功的提示条（只在刚绑定完时出现） */
.home-alert {
  margin: 18px 0 0; padding: 10px 14px; border-radius: 12px; font-size: 13px;
  background: #e8f7ee; color: #137a3d; border: 1px solid #c9ecd7;
}

/* —— 身份卡：渐变竖条 + 问候语 + 右侧操作，右后方一个半透明盾牌水印 —— */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px;
  margin-top: 26px; padding: 26px 30px; border-radius: 18px;
  background: rgba(255, 255, 255, .82); border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 30px rgba(38, 72, 150, .07);
  backdrop-filter: blur(6px);
}
.hero-shield {
  position: absolute; right: 240px; top: 50%; transform: translateY(-50%);
  width: 128px; height: 148px; pointer-events: none;
}
.hero-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.hero-accent {
  width: 5px; height: 48px; border-radius: 99px; flex: none;
  background: linear-gradient(180deg, #6ea2ff, #2f6bff);
}
.hero-text h1 { margin: 0; font-size: 27px; font-weight: 700; letter-spacing: .3px; }
.hero-text p { margin: 6px 0 0; font-size: 13.5px; color: var(--home-muted, #7b8aa6); }
.hero-text p span { color: #3a4a68; }
.hero-text p i { font-style: normal; margin-left: 8px; color: #9aa8c2; }

.hero-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 9px 20px; border-radius: 999px; font-size: 14px; text-decoration: none;
  background: #fff; border: 1px solid #dbe6fb; color: #2f6bff;
  transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}
.pill:hover { border-color: #b9ccf5; box-shadow: 0 6px 16px rgba(47, 107, 255, .14); transform: translateY(-1px); }
.pill svg { width: 17px; height: 17px; }
.pill-exit { color: #40506e; border-color: #e2e8f4; }
.pill-exit:hover { color: #2f6bff; border-color: #b9ccf5; }

/* —— 系统入口面板 —— */
.panel {
  margin-top: 22px; padding: 22px 26px 26px; border-radius: 18px;
  background: rgba(255, 255, 255, .82); border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 30px rgba(38, 72, 150, .06);
  backdrop-filter: blur(6px);
}
.panel-title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-size: 17px; font-weight: 700; letter-spacing: .3px;
}
.panel-title svg { width: 22px; height: 22px; }

/* 五列宫格；窄屏在下面的媒体查询里依次降为四 / 三 / 两 / 一列 */
.app-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.app-card {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 14px; border-radius: 14px; text-decoration: none; color: inherit;
  background: rgba(255, 255, 255, .92); border: 1px solid #e6edf9;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.app-card:hover {
  border-color: #bfd2f7; transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(47, 107, 255, .12);
}
/* 图标块：底色 + 前景色由各系统的 .app-ico.<key> 决定，保持每张卡有识别色 */
.app-ico {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  display: grid; place-items: center; background: #eef3fe; color: #2f6bff;
}
.app-ico svg { width: 20px; height: 20px; }
.app-ico.agent     { background: #e8f0ff; color: #2f6bff; }
.app-ico.image     { background: #f0eaff; color: #7c4dff; }
.app-ico.inventory { background: #e4f8ee; color: #0fa968; }
.app-ico.listing   { background: #fff1e2; color: #f08a24; }
.app-ico.msg       { background: #e2f7fc; color: #13a8c9; }
.app-ico.notes     { background: #f1ecff; color: #8659e8; }
.app-ico.ship      { background: #fdeceb; color: #e2564f; }
.app-ico.toolbox   { background: #e3f7f4; color: #2f9d8f; }
.app-ico.wb        { background: #f2e9ff; color: #7a3fbd; }
.app-ico.wbkw      { background: #fdeaf5; color: #c94a9c; }
.app-ico.xundian   { background: #e8f0ff; color: #2f6bff; }

.app-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.app-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-host { font-size: 11px; color: #8b9ab6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-go { width: 16px; height: 16px; flex: none; margin-left: auto; color: #bac5db; }
.app-card:hover .app-go { color: #2f6bff; }

/* —— 页脚：两侧渐隐细线夹一句标语 —— */
.home-foot { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 30px; }
.home-foot .line {
  width: 90px; height: 1px;
  background: linear-gradient(90deg, rgba(190, 205, 232, 0), rgba(190, 205, 232, .9), rgba(190, 205, 232, 0));
}
.home-foot .txt { font-size: 12.5px; color: #93a2bd; letter-spacing: 2.5px; }

/* 通用窄屏收口（登录页 / 管理页共用） */
@media (max-width: 520px) {
  .wrap { padding: 24px 14px 16px; }
  .card { padding: 18px 16px; }
  .card.narrow { margin-top: 16px; padding: 24px 18px; }
  .title { font-size: 18px; }
}

/* 首页按宽度逐级降列，避免卡片被挤成两行 */
@media (max-width: 1360px) { .app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 920px) {
  .home-shell { padding: 24px 24px 28px; }
  .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-shield { display: none; }
}
@media (max-width: 700px) {
  .home-shell { padding: 20px 16px 24px; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { flex-wrap: wrap; padding: 20px 20px; gap: 14px; }
  .hero-text h1 { font-size: 22px; }
  .hero-actions { margin-left: 0; width: 100%; }
  .brand-text strong { font-size: 18px; }
  .panel { padding: 18px 16px 20px; }
}
@media (max-width: 430px) {
  .app-grid { grid-template-columns: 1fr; }
  .home-foot .line { width: 36px; }
}
