/* MES 账号登录：右上角槽位 + 小窗口 */
.mes-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.mes-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 8px;
  border: 1px solid #2a3441;
  border-radius: 999px;
  background: #111820;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1;
}

.mes-user i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3fb950;
  display: inline-block;
}

.mes-user b {
  font-weight: 600;
  color: #e6edf3;
}

.mes-user button {
  border: 0;
  background: transparent;
  color: #8b98a5;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
}

.mes-user button:hover { color: #e6edf3; background: #1b242e; }

.mes-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid #2f4f7a;
  background: #16283c;
  color: #cfe3ff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.mes-login-btn:hover { background: #1b3450; border-color: #3f6da8; }
.mes-login-btn:focus-visible { outline: 2px solid #4c8dff; outline-offset: 2px; }

/* 小窗口 */
.mes-mask {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 14, .68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 60;
}

.mes-mask[hidden] { display: none; }

.mes-card {
  width: min(420px, 100%);
  background: #0f151c;
  border: 1px solid #26303c;
  border-radius: 16px;
  padding: 24px 24px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.mes-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 650;
  color: #f0f4f8;
}

.mes-tip {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.65;
  color: #9aa7b4;
}

.mes-tip strong { color: #dbe6f1; font-weight: 600; }

.mes-field {
  display: block;
  margin-bottom: 14px;
}

.mes-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: #9aa7b4;
}

.mes-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid #2a3441;
  background: #0b1117;
  color: #f0f4f8;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.mes-field input::placeholder { color: #5f6b78; }
.mes-field input:focus {
  outline: none;
  border-color: #4c8dff;
  box-shadow: 0 0 0 3px rgba(76, 141, 255, .18);
}

.mes-err {
  margin: 2px 0 12px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid #5b2a2a;
  background: #251416;
  color: #ffb4ab;
  font-size: 12.5px;
  line-height: 1.55;
}

.mes-err[hidden] { display: none; }

.mes-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.mes-actions button {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.mes-ghost {
  background: transparent;
  border-color: #2a3441 !important;
  color: #9aa7b4;
}

.mes-ghost:hover { color: #e6edf3; background: #151d25; }

.mes-primary {
  background: #2f6fd0;
  color: #fff;
}

.mes-primary:hover { background: #3a7ee0; }
.mes-primary:disabled { opacity: .6; cursor: default; }

.mes-foot {
  margin: 14px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: #6d7986;
}

/* ---------- 登录引导卡片（从 auth.css 迁移，保持深色卡片外观） ---------- */
.gate {
  width: min(760px, calc(100% - 40px));
  margin: 40px auto 0;
  background: #161b22;
  border: 1px solid #2a333f;
  border-radius: 14px;
  padding: 26px 26px 24px;
  color: #e6edf3;
}
.gate h2 { margin: 0 0 10px; font-size: 19px; }
.gate p { margin: 0 0 8px; color: #9fb0c0; font-size: 13.5px; line-height: 1.7; }
.gate .gate-note { color: #7d8a97; font-size: 12.5px; }
.gate button {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  border: 1px solid #2f81f7;
  background: #2f81f7;
  color: #fff;
  font-weight: 600;
}
.gate button:hover { background: #4090ff; }
.gate-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.gate-actions .gate-link { color: #2f81f7; font-size: 13px; text-decoration: none; }
.gate-actions .gate-link:hover { text-decoration: underline; }
.gate-net { border-color: #4a3a1a; background: #1b1710; }
.gate-net h2 { color: #e3b341; }

/* 记住账号后的提示（中性色，不用警告黄） */
.gate-hint {
  margin: 2px 0 0;
  padding: 10px 12px;
  border: 1px solid #263241;
  border-radius: 10px;
  background: #121820;
  color: #b6c3d1;
  font-size: 13px;
  line-height: 1.65;
}
.gate-hint b { color: #e6edf3; font-weight: 600; }
.gate-actions .gate-link-btn {
  min-height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: #2f81f7;
  font-weight: 400;
  font-size: 13px;
}
.gate-actions .gate-link-btn:hover { background: none; text-decoration: underline; }

@media (max-width: 640px) {
  .gate { width: calc(100% - 24px); margin: 18px auto 0; padding: 18px 16px; }
  .gate h2 { font-size: 16.5px; }
  .gate p { font-size: 13px; }
}

/* “记住这个账号” 勾选行 */
.mes-remember {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 12px;
  color: #9fb0c0;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}
.mes-remember input[type="checkbox"] {
  margin: 3px 0 0;
  width: 14px;
  height: 14px;
  accent-color: #3b82f6;
  flex: 0 0 auto;
}
.mes-remember span { flex: 1 1 auto; }

/* 已记住账号时的小提示 + 自动登录间隔 */
.mes-remember-hint {
  margin: -4px 0 12px;
  color: #8ea3b8;
  font-size: 12px;
  line-height: 1.6;
}
.mes-field-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mes-field-inline > span {
  flex: 0 0 auto;
  margin: 0;
}
.mes-field select {
  flex: 1 1 auto;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #2b3644;
  background: #0f151c;
  color: #dbe6f1;
  font-family: inherit;
  font-size: 13.5px;
}
.mes-field select:focus {
  outline: none;
  border-color: #2f81f7;
  box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.18);
}

/* ---------- 浅色主题（白天）覆盖：登录引导 / MES 登录小窗 ---------- */
:root[data-theme="light"] .gate { background: #fff; border-color: #dce4ed; color: #17212b; }
:root[data-theme="light"] .gate h2 { color: #17212b; }
:root[data-theme="light"] .gate p { color: #526273; }
:root[data-theme="light"] .gate .gate-note { color: #637487; }
:root[data-theme="light"] .gate button { background: #0969da; border-color: #0969da; }
:root[data-theme="light"] .gate button:hover { background: #0757b8; }
:root[data-theme="light"] .gate-actions .gate-link { color: #0969da; }
:root[data-theme="light"] .gate-net { background: #fff8e6; border-color: #e8cf9a; }
:root[data-theme="light"] .gate-net h2 { color: #8a5a00; }
:root[data-theme="light"] .gate-hint { background: #f7f9fc; border-color: #dce4ed; color: #3f4c5a; }
:root[data-theme="light"] .gate-hint b { color: #17212b; }
:root[data-theme="light"] .gate-actions .gate-link-btn { color: #0969da; }
:root[data-theme="light"] .mes-user { background: #fff; border-color: #dce4ed; color: #3f4c5a; }
:root[data-theme="light"] .mes-user b { color: #17212b; }
:root[data-theme="light"] .mes-user button { color: #637487; }
:root[data-theme="light"] .mes-user button:hover { color: #17212b; background: #eef2f7; }
:root[data-theme="light"] .mes-login-btn { background: #eaf2fe; border-color: #b9d3f7; color: #0b5bc0; }
:root[data-theme="light"] .mes-login-btn:hover { background: #ddebfd; border-color: #8fb8ee; }
:root[data-theme="light"] .mes-mask { background: rgba(12, 20, 30, .35); }
:root[data-theme="light"] .mes-card { background: #fff; border-color: #dce4ed; box-shadow: 0 24px 60px rgba(16, 24, 40, .18); }
:root[data-theme="light"] .mes-card h3 { color: #17212b; }
:root[data-theme="light"] .mes-tip { color: #526273; }
:root[data-theme="light"] .mes-tip strong { color: #17212b; }
:root[data-theme="light"] .mes-field span { color: #526273; }
:root[data-theme="light"] .mes-field input { background: #f7f9fc; border-color: #d3dde8; color: #17212b; }
:root[data-theme="light"] .mes-field input::placeholder { color: #93a2b2; }
:root[data-theme="light"] .mes-field input:focus { border-color: #0969da; box-shadow: 0 0 0 3px rgba(9, 105, 218, .14); }
:root[data-theme="light"] .mes-err { background: #fdecea; border-color: #f2b8b2; color: #a3271b; }
:root[data-theme="light"] .mes-ghost { border-color: #d3dde8 !important; color: #526273; }
:root[data-theme="light"] .mes-ghost:hover { color: #17212b; background: #eef2f7; }
:root[data-theme="light"] .mes-primary { background: #0969da; }
:root[data-theme="light"] .mes-primary:hover { background: #0757b8; }
:root[data-theme="light"] .mes-foot { color: #637487; }
:root[data-theme="light"] .mes-remember { color: #526273; }
:root[data-theme="light"] .mes-remember-hint { color: #637487; }
:root[data-theme="light"] .mes-field select { background: #f7f9fc; border-color: #d3dde8; color: #17212b; }
