/* ---------------------------------------------------------------
   Design tokens / reset — shared by every page
   --------------------------------------------------------------- */
:root {
  --ink: #101a33;
  --ink-soft: #34405c;
  --muted: #6b7791;
  --line: #e4e9f4;
  --surface: #ffffff;
  --surface-soft: #f6f8fd;
  --brand: #2f6bff;
  --brand-deep: #1d4ed8;
  --brand-violet: #6c4bff;
  --feishu: #3370ff;
  --danger: #d93a3a;
  --success: #12a150;
  --radius-lg: 26px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-lg: 0 32px 80px -34px rgba(16, 26, 51, 0.45);
  --shadow-sm: 0 1px 2px rgba(16, 26, 51, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.alerts {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.alert--error {
  background: #fff4f4;
  border-color: #ffd9d9;
  color: #b3261e;
}

.alert--success {
  background: #f1fbf5;
  border-color: #cdeed9;
  color: #106b3b;
}

.alert--info,
.alert--warning {
  background: #f4f7ff;
  border-color: #dbe5ff;
  color: #29427d;
}

/* ---------------------------------------------------------------
   备案信息（登录页 / 应用页脚）
   --------------------------------------------------------------- */
.site-records {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  font-size: 12px;
  line-height: 1.6;
  color: #9aa4bb;
}

.site-records__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8492ad;
}

.site-records__item:hover {
  color: var(--brand);
  text-decoration: none;
}

.site-records__icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* ---------------------------------------------------------------
   Test environment notice (DJANGO_DEBUG=true)
   置顶、不可关闭：没有关闭按钮，滚动时固定在视口顶部
   --------------------------------------------------------------- */
.test-env-notice {
  position: sticky;
  top: 0;
  z-index: 50; /* 低于移动端侧栏抽屉(60)，抽屉展开时覆盖提示 */
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  background-color: #b42318;
  background-image: linear-gradient(90deg, #9f1f16, #c0392b 50%, #9f1f16);
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: 0.2px;
  text-align: center;
}

.test-env-notice__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffe0b3;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}

/* 提示条占据自身高度，正文区域撑满剩余视口，避免多出一屏滚动 */
body.has-test-env-notice {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.has-test-env-notice > .app-shell,
body.has-test-env-notice > .login-page {
  flex: 1 0 auto;
  min-height: 0;
}

@media (max-width: 600px) {
  .test-env-notice {
    padding: 8px 14px;
    font-size: 12px;
  }
}
