/* 专属密钥登录门户与单会话精简模式样式 */
.key-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 20% 20%, rgba(56, 139, 253, 0.12), transparent 48%),
              radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.08), transparent 48%),
              #111214;
  backdrop-filter: blur(12px);
}
.key-gate-overlay.hidden { display: none !important; }
.key-gate-card {
  width: 100%;
  max-width: 420px;
  background: #1a1b1e;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 32px 28px 28px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  color: #e8e9ec;
}
.key-gate-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #fff;
}
.key-gate-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.key-gate-sub {
  margin: 0 0 22px;
  font-size: 13px;
  line-height: 1.55;
  color: #9aa0a6;
}
.key-gate-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.key-gate-input {
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #121316;
  color: #f3f4f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.key-gate-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.key-gate-btn {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.key-gate-btn:hover:not(:disabled) { background: #1d4ed8; }
.key-gate-btn:disabled { opacity: 0.6; cursor: wait; }
.key-gate-err {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fca5a5;
  font-size: 12.5px;
  line-height: 1.45;
}
.key-gate-err.hidden { display: none; }

/* 顶栏密钥身份胶囊与登出按钮 */
.topbar-key-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 12px;
  margin-right: 8px;
}
.topbar-key-chip.hidden { display: none; }
.topbar-key-quota {
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.topbar-logout-btn {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 5px;
}
.topbar-logout-btn:hover { color: #f87171; background: rgba(248, 113, 113, 0.1); }

/* 单会话密钥极简模式：彻底隐藏左侧边栏与展开按钮 */
.notion-shell.single-session-mode .sidebar,
.notion-shell.single-session-mode #sidebarExpandBtn {
  display: none !important;
}
