:root {
  --primary: #1890ff;
  --primary-hover: #40a9ff;
  --text-main: #262626;
  --text-sec: #8c8c8c;
  --border: #d9d9d9;
  --bg-left: #f5f8fc;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: #fff;
}
a { text-decoration: none; }

/* ============ 布局：左品牌 + 右登录 ============ */
.page { display: flex; height: 100vh; overflow: hidden; }

.left {
  flex: 1;
  background: var(--bg-left);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px 60px;
}
.left .brand { display: flex; align-items: center; gap: 10px; z-index: 2; }
.left .brand img { width: 30px; height: 30px; display: block; object-fit: contain; }
.left .brand span { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.left .hero { flex: 1; display: flex; flex-direction: column; justify-content: center; z-index: 2; max-width: 640px; }
.left .hero h1 { font-size: 38px; font-weight: 600; line-height: 1.4; margin-bottom: 28px; }
.left .hero h1 em { color: var(--primary); font-style: normal; }
.left .deco1, .left .deco2 { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.left .deco1 { width: 480px; height: 480px; right: -8%; top: -12%; background: rgba(24,144,255,.10); }
.left .deco2 { width: 380px; height: 380px; left: -6%; bottom: -12%; background: rgba(99,102,241,.08); }

/* 仪表盘示意卡 */
.mock {
  margin-top: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(24,144,255,.12);
  padding: 22px 24px;
  max-width: 560px;
}
.mock .row { display: flex; gap: 18px; }
.mock .stat { flex: 1; background: #fafbfc; border: 1px solid #f0f2f5; border-radius: 12px; padding: 14px 16px; }
.mock .stat .cap { font-size: 12px; color: #b0b6bf; margin-bottom: 6px; }
.mock .stat .num { font-size: 28px; font-weight: 700; }
.mock .stat .num i { font-size: 11px; color: #52c41a; background: #f6ffed; padding: 2px 5px; border-radius: 4px; margin-left: 8px; font-style: normal; }
.mock .widgets { width: 170px; display: flex; flex-direction: column; gap: 12px; }
.mock .widget { background: #fff; border: 1px solid #f0f2f5; border-radius: 12px; padding: 12px; flex: 1; }
.mock .icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mock .icon-grid i { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 13px; }
.mock .foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid #f5f5f5; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: #434343; }
.mock .foot .line { flex: 1; height: 1px; background: linear-gradient(to right, #e8e8e8, transparent); }

/* ============ 右侧登录区（卡片规格对齐氚云：458×626 固定，垂直居中） ============ */
.right {
  flex: 1;
  background: var(--bg-left);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
}
.box {
  width: 458px;
  height: 626px;
  flex: none;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 6px 16px -8px rgba(0,0,0,.08), 0 10px 28px rgba(0,0,0,.05), 0 12px 48px 16px rgba(0,0,0,.03);
  padding: 58px 48px;
}
.box h2 { font-size: 24px; font-weight: 600; margin-bottom: 30px; }

.tabs { display: flex; gap: 26px; border-bottom: 1px solid #f0f0f0; margin-bottom: 28px; }
.tabs button {
  background: none; border: none; cursor: pointer;
  font-size: 14px; color: var(--text-sec);
  padding: 0 2px 11px; position: relative; font-weight: 500;
}
.tabs button.active { color: var(--primary); }
.tabs button.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--primary); border-radius: 2px;
}

.view { display: none; }
.view.show { display: block; }

.fld { margin-bottom: 18px; }
.fld input, .fld-row input {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 14px; color: var(--text-main); outline: none;
  transition: all .2s;
}
.fld input::placeholder { color: #bfbfbf; }
.fld input:focus, .fld-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(24,144,255,.2);
}
.fld-row { display: flex; gap: 10px; margin-bottom: 18px; }
.fld-row input { flex: 1; }
.fld-row .btn-code {
  height: 40px; padding: 0 12px; white-space: nowrap;
  border: 1px solid var(--primary); color: var(--primary);
  background: none; border-radius: 4px; font-size: 13px; cursor: pointer;
}
.fld-row .btn-code:hover { background: #f0f8ff; }
.fld-row .btn-code:disabled { color: #bfbfbf; border-color: #e8e8e8; cursor: not-allowed; background: none; }

.btn-main {
  width: 100%; height: 40px; border: none; border-radius: 4px;
  background: var(--primary); color: #fff; font-size: 15px; font-weight: 500;
  cursor: pointer; transition: all .2s; margin-top: 4px;
}
.btn-main:hover { background: var(--primary-hover); }
.btn-main:active { transform: scale(.99); }
.btn-main:disabled { background: #a8c8f0; cursor: not-allowed; }

.foot-links { margin-top: 16px; display: flex; justify-content: space-between; font-size: 13px; color: var(--text-sec); }
.foot-links a { color: var(--text-sec); }
.foot-links a:hover { color: var(--primary); }

/* 提示条 */
.msg {
  display: none; margin-bottom: 14px; padding: 8px 12px;
  font-size: 13px; border-radius: 4px;
}
.msg.err { display: block; background: #fff1f0; color: #f5222d; border: 1px solid #ffa39e; }
.msg.info { display: block; background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }

/* 微信扫码占位 */
.qr-wrap { text-align: center; padding: 8px 0 4px; }
.qr-box {
  width: 190px; height: 190px; margin: 0 auto 16px;
  border: 1px solid #f0f0f0; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: #fafafa;
}
.qr-box svg { opacity: .35; }
.qr-note { font-size: 13px; color: var(--text-sec); line-height: 1.8; }

/* ============ 页脚 ============ */
.copyright {
  position: fixed; bottom: 14px; left: 0; right: 0;
  text-align: center; font-size: 12px; color: #b0b6bf; z-index: 1;
}
.copyright a { color: #b0b6bf; text-decoration: none; }
.copyright a:hover { text-decoration: underline; }

/* ============ 门户页 ============ */
.topbar {
  height: 60px; background: #fff; box-shadow: 0 1px 8px rgba(0,0,0,.05);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; position: sticky; top: 0; z-index: 5;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand img { width: 26px; height: 26px; display: block; object-fit: contain; }
.topbar .brand span { font-size: 18px; font-weight: 700; }
.topbar .who { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--text-main); }
.topbar .who .exp { font-size: 12px; color: #faad14; background: #fffbe6; border: 1px solid #ffe58f; padding: 2px 8px; border-radius: 4px; }
.topbar .who a { color: var(--text-sec); cursor: pointer; }
.topbar .who a:hover { color: var(--primary); }

.portal-main { max-width: 1100px; margin: 0 auto; padding: 48px 32px; }
.portal-main h3 { font-size: 18px; margin-bottom: 22px; color: var(--text-main); font-weight: 600; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.app-card {
  background: #fff; border: 1px solid #f0f2f5; border-radius: 14px;
  padding: 26px 24px; cursor: pointer; transition: all .25s;
  display: flex; align-items: center; gap: 16px;
}
.app-card:hover { box-shadow: 0 10px 30px rgba(24,144,255,.14); transform: translateY(-3px); border-color: #d6e8ff; }
.app-card .icon {
  width: 52px; height: 52px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 700;
}
.app-card .meta .t { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.app-card .meta .s { font-size: 12px; color: var(--text-sec); }
.app-card .enter-btn {
  margin-left: auto; flex: none; padding: 8px 18px; border-radius: 8px;
  border: 1px solid var(--primary); background: var(--primary); color: #fff;
  font-size: 13px; cursor: pointer; transition: opacity .2s;
}
.app-card .enter-btn:hover { opacity: .85; }
.app-card .enter-btn:disabled { border-color: #dcdfe6; background: #f5f7fa; color: #a8abb2; cursor: not-allowed; }
.empty {
  text-align: center; color: var(--text-sec); padding: 70px 0; font-size: 14px;
}

/* 新建应用卡片 */
.app-card.add {
  border: 1.5px dashed #c9d4e3; background: #fafcff; color: var(--text-sec);
}
.app-card.add:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 10px 30px rgba(24,144,255,.10); transform: translateY(-3px); }
.app-card.add .plus {
  width: 52px; height: 52px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #e6f7ff; color: var(--primary); font-size: 26px; font-weight: 400;
}

/* 新建应用弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center; z-index: 20;
}
.modal {
  width: 400px; background: #fff; border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18); padding: 28px 32px;
}
.modal h3 { font-size: 18px; font-weight: 600; margin-bottom: 22px; }
.fld2 { margin-bottom: 16px; }
.fld2 label { display: block; font-size: 13px; color: var(--text-sec); margin-bottom: 6px; }
.fld2 select, .fld2 input {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 14px; color: var(--text-main); outline: none; background: #fff;
  transition: all .2s;
}
.fld2 select:focus, .fld2 input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(24,144,255,.2); }
.modal-foot { display: flex; gap: 12px; margin-top: 24px; }
.modal-foot .btn-main { margin-top: 0; flex: 1; }
.btn-ghost {
  flex: 1; height: 40px; border: 1px solid var(--border); border-radius: 4px;
  background: #fff; color: var(--text-main); font-size: 14px; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

@media (max-width: 900px) {
  .left { display: none; }
  .box { max-width: calc(100vw - 32px); }
}
