:root {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell',
    'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-size: 87.5%; /* 16px → 14px，整体缩小一号 */
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light;
  color: rgba(0, 0, 0, 0.87);
  background-color: #ffffff;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  width: 100%;
}

body {
  margin: 0;
  display: flex;
  min-width: 320px;
  min-height: 100vh;
}

#root {
  width: 100%;
}
.highlight-flash {
  animation: highlightFlash 3s ease-out;
}

@keyframes highlightFlash {
  0% { background-color: #fffbe6; }
  30% { background-color: #fffbe6; }
  100% { background-color: transparent; }
}
.main-layout {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-header {
  background: #001529;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.main-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.main-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 24px;
}

.main-header-nav-link {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  padding: 4px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.main-header-nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.main-header-actions .anticon {
  color: white;
  font-size: 20px;
}

/* 「保存工作」磁盘图标：位于用户名与铃铛之间 */
.main-header-save-icon {
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background-color 0.2s, transform 0.1s;
}

.main-header-save-icon:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.main-header-save-icon:active {
  transform: scale(0.92);
}

/* 铃铛（NotificationCenter）在 header 里垂直对齐微调：略微下移对齐用户名与磁盘图标 */
.main-header-actions .ant-badge {
  display: inline-flex;
  align-items: center;
}

.main-header-actions .ant-badge .anticon {
  position: relative;
  top: 6px;
}

.main-header h1 {
  color: white;
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.main-content {
  margin-top: 64px;
  flex: 1;
  overflow-y: auto;
  display: flex;
}

.main-header-user {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-header-user::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  background-image: linear-gradient(135deg, #667eea, #764ba2);
  vertical-align: middle;
}
.error-boundary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 24px;
}

.error-details {
  margin-top: 24px;
  text-align: left;
  max-width: 800px;
}

.error-details details {
  background-color: #f5f5f5;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 16px;
  cursor: pointer;
}

.error-details summary {
  font-weight: 500;
  color: #595959;
  user-select: none;
  outline: none;
}

.error-details summary:hover {
  color: #262626;
}

.error-stack {
  margin-top: 12px;
  padding: 12px;
  background-color: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #262626;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.error-stack strong {
  color: #cf1322;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell',
    'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}
