/* ===== BASE.CSS — CSS 变量 & 全局重置 ===== */

:root {
  /* 背景色 */
  --color-bg:           #FAF8F5;
  --color-surface:      #FFFFFF;
  --color-surface-warm: #F5F0E8;

  /* 品牌色：深墨绿 */
  --color-brand:        #2C4A3E;
  --color-brand-light:  #4A7363;
  --color-brand-pale:   #E8F0EC;

  /* 文字 */
  --color-text-primary:   #1A1A1A;
  --color-text-secondary: #5C5C5C;
  --color-text-muted:     #999999;
  --color-text-inverse:   #FFFFFF;

  /* 岗位状态 */
  --color-status-open:   #2C4A3E;
  --color-status-closed: #999999;
  --color-status-draft:  #B08850;

  /* 投递状态 */
  --color-pending:  #B08850;
  --color-read:     #4A7363;
  --color-hired:    #2C4A3E;
  --color-rejected: #A04840;

  /* 边框 */
  --color-border:       #E8E4DC;
  --color-border-light: #F0EDE6;

  /* 卡片封面预设色 */
  --cover-1: #E8DDD0;
  --cover-2: #D0DDE8;
  --cover-3: #D8E8D0;
  --cover-4: #E8D0D8;
  --cover-5: #E8E0D0;
  --cover-6: #D8D0E8;

  /* 字体 */
  --font-sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, sans-serif;
  --font-serif: "Noto Serif SC", "SimSun", Georgia, serif;

  /* 字号 */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  2rem;
  --text-4xl:  2.5rem;

  /* 行高 */
  --leading-tight:  1.3;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  /* 字重 */
  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* 间距 */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* 圆角 */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:    0 8px 24px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 12px 32px rgba(0,0,0,0.12);

  /* 过渡 */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === 全局重置 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* === 页面进入动画 === */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: pageEnter 0.35s ease forwards; }

/* === Toast 通知 === */
.toast {
  position: fixed;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--color-text-primary);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  z-index: 9999;
  opacity: 0;
  transition: all var(--transition-normal);
  white-space: nowrap;
  max-width: 90vw;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}
.toast.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast--success { background: var(--color-brand); }
.toast.toast--warning { background: var(--color-status-draft); color: #1A1A1A; }
.toast.toast--error   { background: var(--color-rejected); }

/* === 确认弹窗 === */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 9998;
  animation: pageEnter 0.2s ease;
}
.confirm-box {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 360px; width: 90%;
  box-shadow: var(--shadow-lg);
}
.confirm-message {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  margin-bottom: var(--space-6);
}
.confirm-actions {
  display: flex; gap: var(--space-3); justify-content: flex-end;
}

/* === 脉冲动画（紧急截止日期） === */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.deadline--urgent { animation: pulse 2s infinite; }
