/* app/static/css/main.css */

/* 全局基础 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1f2933;
}

/* ------------- 登录页专用样式 ------------- */

.auth-body {
  min-height: 100vh;
  position: relative;
  background: #050816;
  color: #111827;
  overflow: hidden;
}

/* 背景渐变 + 模糊球 */
.auth-gradient-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(96, 165, 250, 0.35), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(129, 140, 248, 0.35), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(45, 212, 191, 0.25), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(251, 191, 36, 0.2), transparent 55%),
    linear-gradient(135deg, #020617, #020617 40%, #020617 100%);
  filter: blur(0);
  z-index: 0;
}

/* 页面主体容器 */
.auth-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 顶部品牌区 */
.auth-brand {
  width: 100%;
  max-width: 960px;
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  color: #e5e7eb;
}

.auth-logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0b1020;
  margin-right: 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.45);
}

.auth-brand-text {
  display: flex;
  flex-direction: column;
}

.auth-brand-title {
  font-size: 18px;
  font-weight: 600;
}

.auth-brand-subtitle {
  font-size: 13px;
  opacity: 0.8;
}

/* flash 消息 */
.auth-flash-container {
  width: 100%;
  max-width: 960px;
  margin-bottom: 16px;
}

.auth-flash {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  backdrop-filter: blur(10px);
  background: rgba(248, 250, 252, 0.18);
  border: 1px solid rgba(248, 250, 252, 0.25);
  color: #f9fafb;
}

.auth-flash-danger {
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(127, 29, 29, 0.4);
}

/* 登录卡片布局 */
.auth-card {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 24px;
  padding: 28px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(24px);
  box-shadow:
    0 30px 60px rgba(15, 23, 42, 0.6),
    0 0 0 1px rgba(148, 163, 184, 0.1);
  color: #e5e7eb;
}

.auth-card-left,
.auth-card-right {
  display: flex;
  flex-direction: column;
}

/* 左侧：表单 */
.auth-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 600;
}

.auth-desc {
  margin: 0 0 24px;
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5f5;
}

.auth-desc strong {
  color: #fbbf24;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 13px;
  color: #e5e7eb;
}

.auth-input-wrapper {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.8;
}

.auth-input {
  width: 100%;
  padding: 10px 12px 10px 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-input::placeholder {
  color: #6b7280;
}

.auth-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.6);
  background: rgba(15, 23, 42, 0.9);
}

.auth-error {
  font-size: 12px;
  color: #fecaca;
}

.auth-actions {
  margin-top: 8px;
}

.auth-btn-primary {
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background-image: linear-gradient(135deg, #60a5fa, #22d3ee);
  color: #020617;
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.45);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

.auth-btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

.auth-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.4);
}

.auth-hint {
  margin-top: 16px;
  font-size: 12px;
  color: #9ca3af;
}

.auth-hint code {
  background: rgba(15, 23, 42, 0.8);
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

/* 右侧：说明卡片 */
.auth-card-right {
  border-left: 1px solid rgba(148, 163, 184, 0.25);
  padding-left: 22px;
}

.auth-stats-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: radial-gradient(circle at top left, rgba(96, 165, 250, 0.15), transparent),
              rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.8);
}

.auth-stats-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #e5e7eb;
}

.auth-stats-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: #cbd5f5;
}

.auth-stats-list li {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.auth-footer-note {
  margin-top: auto;
  margin-bottom: 4px;
  font-size: 12px;
  color: #9ca3af;
  text-align: right;
}

/* 响应式：小屏幕改成上下布局 */
@media (max-width: 768px) {
  .auth-page {
    padding: 24px 16px;
  }

  .auth-brand {
    justify-content: center;
    text-align: center;
  }

  .auth-card {
    padding: 20px;
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-card-right {
    display: none; /* 小屏幕隐藏右侧说明，否则太挤 */
  }
}

/* Logo 居中展示样式 */
.auth-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 230px;
  width: 100%;
  padding: 10px;
  text-align: center;
}

.auth-logo-img {
  max-width: 50%;
  height: auto;
  opacity: 0.92;
  transition: transform 0.25s ease, opacity 0.25s ease;
  filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.3));
}

.auth-logo-img:hover {
  opacity: 1;
  transform: scale(1.04);
}

/* 小屏幕隐藏右侧区块 */
@media (max-width: 768px) {
  .auth-card-right {
    display: none;
  }
}

/* 登录页：演示账号提示区域（可随时删除） */
.auth-demo-hint {
  width: 100%;
  max-width: 960px;
  margin: 14px auto 0;
  font-size: 12px;
  color: #9ca3af;
}

.auth-demo-hint code {
  background: rgba(15, 23, 42, 0.8);
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
}