/* 登录页专用样式 - 轻量级，无依赖 */
/* 全局 reset 与 global.scss 完全一致，避免 JS 加载后样式跳变（闪烁根因） */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body, #app {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa;
  color: #303133;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 14px;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* 首页外壳：全局左右边距 60px，纵向弹性布局（版权贴底） */
.home-shell {
  min-height: 100vh;
  background: #f5f7fa;
  padding: 0 60px;
  display: flex;
  flex-direction: column;
}

/* LOGO：正常流，顶部 38px */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 38px;
}

.brand-logo img { width: 36px !important; height: 36px !important; max-width: 36px !important; max-height: 36px !important; border-radius: 8px; object-fit: cover; }
/* 对齐定版（2026-09-05）："图单"整体上移 2px（LOGO 位置不变），行高与 LOGO 同高（36px）
   + flex 居中让字形光学居中，与 LOGO 同水平中心线 */
.brand-logo span { font-size: 36px; font-weight: 700; color: #303133; letter-spacing: 2px; line-height: 36px; display: flex; align-items: center; position: relative; top: -2px; }

/* 表格布局：LOGO 下方 30px，去边框，左列卡片 + 右列登录窗口 */
.home-table {
  display: flex;
  margin-top: 30px;
  gap: 20px;
  align-items: flex-start;
}

/* 左列：自由收缩、可换行，靠左向上对齐 */
.home-left {
  flex: 1;
  min-width: 0;
}

/* 右列：固定 350px，窗口小时始终显示，不溢出表格外 */
.home-right {
  width: 350px;
  flex-shrink: 0;
}

/* 版权：贴底，底部边距 28px */
.copyright {
  margin-top: auto;
  padding: 0 0 28px;
}

.copyright p { text-align: center; font-size: 14px; color: #666; }

/* 登录卡片：固定 300×360（不可变），靠左向上位于右列 */
.login-page { background: transparent; position: relative; }

.login-card {
  position: relative;
  width: 300px;
  height: 360px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  overflow: hidden;
}

.tab-switcher { position: absolute; top: 0; right: 0; z-index: 10; }

.tab-btn {
  display: block;
  background: #ecf5ff;
  color: #409eff;
  border: none;
  font-size: 14px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 0 8px 0 8px;
  font-weight: 500;
  font-family: inherit;
  transition: background 0.2s;
}

.tab-btn:hover { background: #d9ecff; }

.content-area {
  padding: 50px 30px 0;
  height: 290px;
  box-sizing: border-box;
  position: relative;
}

.mode-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.panel-title {
  font-size: 22px;
  font-weight: 500;
  color: #303133;
  margin: 0 0 33px 0;
  text-align: center;
  width: 100%;
  flex-shrink: 0;
}

.account-mode .input-group {
  width: 220px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.underline-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #dcdfe6;
  padding: 12px 0;
  font-size: 14px;
  color: #303133;
  outline: none;
  background: transparent;
  margin-bottom: 20px;
  font-family: inherit;
  transition: border-color 0.2s, border-width 0.2s;
}

.underline-input::placeholder { color: #c0c4cc; }

.underline-input:focus {
  border-bottom-color: #409eff;
  border-bottom-width: 2px;
  padding-bottom: 11px;
  margin-bottom: 19px;
}

.confirm-btn {
  width: 220px;
  height: 48px;
  background: #409eff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  flex-shrink: 0;
}

.confirm-btn:hover:not(:disabled) { background: #66b1ff; }
.confirm-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.qr-mode .qr-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  padding-bottom: 5px;
}

.qr-placeholder {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  border-radius: 8px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e4e7ed;
  border-top-color: #409eff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.qr-image {
  width: 180px !important;
  height: 180px !important;
  max-width: 180px !important;
  max-height: 180px !important;
  border-radius: 8px;
  display: block;
}

/* 成功提示 */
.success-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.success-content { text-align: center; }

.success-icon {
  width: 64px;
  height: 64px;
  background: #67c23a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  font-weight: bold;
  margin: 0 auto 12px;
}

.success-text { color: #303133; font-size: 16px; font-weight: 500; }
