/* ═══════════════════════════════════════════
   启哲岗位通 — Design System (light)
   ═══════════════════════════════════════════ */

:root {
  /* Surface */
  --bg-root: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-overlay: #e2e8f0;

  /* Border */
  --border-subtle: #e2e8f0;
  --border-default: #cbd5e1;
  --border-hover: #94a3b8;
  --border-accent: #bfdbfe;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-disabled: #cbd5e1;

  /* Accent */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-bg: rgba(37, 99, 235, 0.08);
  --accent-border: rgba(37, 99, 235, 0.2);

  /* Semantic */
  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.08);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.08);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);

  /* Tag chips */
  --tag-bg: #eff6ff;
  --tag-text: #2563eb;
  --tag-bg-alt: #f0fdf4;
  --tag-text-alt: #16a34a;

  /* Typography */
  --font-sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", "Consolas", monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --leading: 1.6;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 200ms var(--ease-out);

  /* Layout */
  --max-width: 1200px;
  --navbar-height: 56px;
}

/* ═══════════════════════════════════════════
   Reset
   ═══════════════════════════════════════════ */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading);
  color: var(--text-primary);
  background: var(--bg-root);
  min-height: 100vh;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--text-primary);
  background: transparent;
}

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

::selection { background: rgba(37, 99, 235, 0.15); color: var(--text-primary); }

/* ═══════════════════════════════════════════
   Scrollbar
   ═══════════════════════════════════════════ */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ═══════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all var(--transition-fast);
  outline: none;
  line-height: 1;
  background: var(--bg-surface);
  color: var(--text-primary);
}

.btn:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.btn:focus-visible { box-shadow: 0 0 0 2px var(--accent-bg); border-color: var(--accent); }

.btn-sm { height: 30px; padding: 0 10px; font-size: var(--text-xs); }
.btn-lg { height: 42px; padding: 0 22px; font-size: var(--text-base); }

.btn-primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-outline {
  background: transparent;
  border-color: var(--border-default);
  color: var(--text-primary);
}
.btn-outline:hover { background: var(--bg-elevated); border-color: var(--border-hover); }

.btn-ghost {
  color: var(--text-secondary);
  background: transparent;
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text-primary); }

.btn-icon {
  width: 36px; height: 36px; padding: 0;
  border: none; background: transparent;
  color: var(--text-tertiary); border-radius: var(--radius-md);
  cursor: pointer; font-size: 1.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast); line-height: 1;
}
.btn-icon:hover { background: var(--bg-elevated); color: var(--text-primary); }

.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ═══════════════════════════════════════════
   Navbar
   ═══════════════════════════════════════════ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--navbar-height);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-primary);
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--text-primary); }

.logo-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.logo-text {
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-elevated); }
.nav-link.active { color: var(--accent); background: var(--accent-bg); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: auto;
}

#loginButton {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-link-vip {
  color: var(--warning);
  font-weight: 600;
}
.nav-link-vip:hover { color: var(--warning); background: var(--warning-bg); }
.nav-link-vip::before {
  content: "◆";
  font-size: 0.5rem;
  margin-right: 3px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.nav-link-vip.vip-active {
  color: var(--success);
}
.nav-link-vip.vip-active::before {
  content: "✓";
  font-size: 0.65rem;
  font-weight: 700;
}
.nav-link-vip.vip-active:hover { color: var(--success); background: var(--success-bg); }

/* ═══════════════════════════════════════════
   Page Content
   ═══════════════════════════════════════════ */

.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
}
.page-content.hidden { display: none; }

/* ═══════════════════════════════════════════
   Hero (Home)
   ═══════════════════════════════════════════ */

.hero {
  text-align: center;
  padding: var(--space-4xl) 0 var(--space-3xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}

.hero-accent { color: var(--accent); }

.hero-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  padding: var(--space-2xl) 0 0;
  border-top: 1px solid var(--border-subtle);
}

.stat-item { text-align: center; }

.stat-num {
  display: block;
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-xs);
}

/* ═══════════════════════════════════════════
   Sections
   ═══════════════════════════════════════════ */

.section { margin-bottom: var(--space-3xl); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.section-head h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section-summary {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-left: var(--space-md);
}

.section-more {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-weight: 500;
  transition: color var(--transition-fast);
}
.section-more:hover { color: var(--accent); }

/* ═══════════════════════════════════════════
   Feature Cards (Home)
   ═══════════════════════════════════════════ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.feature-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  color: inherit;
  box-shadow: var(--shadow-sm);
}
.feature-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
  line-height: 1;
}

.feature-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: var(--space-md);
}

.feature-link { font-size: var(--text-sm); color: var(--accent); font-weight: 500; }
.feature-card:hover .feature-link { color: var(--accent-hover); }

/* ═══════════════════════════════════════════
   Job Preview Grid (Home)
   ═══════════════════════════════════════════ */

.job-preview-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.job-preview-grid .loading-placeholder {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  background: var(--bg-surface);
}

/* ═══════════════════════════════════════════
   Inline Tabs
   ═══════════════════════════════════════════ */

.inline-tabs {
  display: flex;
  gap: var(--space-sm);
  background: var(--bg-elevated);
  padding: 3px;
  border-radius: var(--radius-md);
  width: fit-content;
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border-subtle);
}

.itab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.itab:hover { color: var(--text-primary); }
.itab.active {
  background: var(--bg-surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.itab-count {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-overlay);
  color: var(--text-secondary);
}
.itab.active .itab-count { background: var(--accent-bg); color: var(--accent); }

/* ═══════════════════════════════════════════
   Filter Bar (top, horizontal)
   ═══════════════════════════════════════════ */

.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.filter-search {
  width: 180px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-root);
  color: var(--text-primary);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--transition-fast);
  flex-shrink: 0;
}
.filter-search::placeholder { color: var(--text-disabled); }
.filter-search:focus { border-color: var(--accent); }

.filter-select {
  width: 130px;
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-root);
  color: var(--text-primary);
  font-size: var(--text-sm);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color var(--transition-fast);
  flex-shrink: 0;
}
.filter-select:focus { border-color: var(--accent); }

.filter-check {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-check:hover { color: var(--text-primary); }
.filter-check input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   Job List Header
   ═══════════════════════════════════════════ */

.job-header {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
}

.job-header-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jh-title { flex: 2.5; }
.jh-positions { flex: 3; }
.jh-location { flex: 1; width: 90px; }
.jh-update { flex: 0 0 auto; width: auto; min-width: 100px; }
.jh-publish { flex: 0 0 auto; width: auto; min-width: 100px; }
.jh-deadline { flex: 0 0 auto; width: auto; min-width: 100px; }
.jh-nature { flex: 0 0 90px; }
.jh-status { flex: 0 0 50px; text-align: right; }

/* ═══════════════════════════════════════════
   Job List / Cards
   ═══════════════════════════════════════════ */

.job-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.job-card {
  display: flex;
  align-items: center;
  gap: 0;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-align: left;
  width: 100%;
  border: none;
  color: inherit;
  min-height: 52px;
  animation: card-in 300ms var(--ease-out) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.job-card:hover { background: var(--bg-elevated); }
.job-card.active { background: #eff6ff; }

.job-card:last-child { border-bottom: none; }

.job-card-title {
  flex: 2.5;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  padding-right: var(--space-md);
}

.job-card-title.expired-subject { color: var(--text-disabled); font-weight: 400; }

.job-card-positions {
  flex: 3;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  padding-right: var(--space-md);
}

.job-card-meta {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jmc-location { flex: 1; width: 100px; padding-right: var(--space-sm); }
.jmc-update { flex: 0 0 auto; min-width: 100px; padding-right: var(--space-sm); white-space: nowrap; text-overflow: unset; overflow: visible; }
.jmc-publish { flex: 0 0 auto; min-width: 100px; padding-right: var(--space-sm); white-space: nowrap; text-overflow: unset; overflow: visible; }
.jmc-deadline { flex: 0 0 auto; min-width: 100px; padding-right: var(--space-sm); white-space: nowrap; text-overflow: unset; overflow: visible; }
.jmc-nature { flex: 0 0 90px; padding-right: var(--space-sm); }

.jmc-deadline.urgent { color: var(--danger); font-weight: 600; }
.jmc-deadline.deadline-soon { color: var(--warning); font-weight: 600; }
.jmc-deadline.deadline-expired { color: var(--text-disabled); }

.job-card-status { flex: 0 0 50px; text-align: right; font-size: var(--text-xs); }

/* Locked badge */
.locked-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  background: var(--warning-bg);
  color: var(--warning);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  height: 24px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  background: var(--tag-bg);
  color: var(--tag-text);
  white-space: nowrap;
}

.tag.member { background: var(--warning-bg); color: var(--warning); }
.tag.difficulty-medium { color: var(--warning); }
.tag.difficulty-hard { color: var(--danger); }

/* No result */
.no-result {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl) var(--space-xl);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.loading-placeholder {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

/* ═══════════════════════════════════════════
   Pagination
   ═══════════════════════════════════════════ */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding: var(--space-md) 0;
}

.page-num {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  min-width: 32px;
  text-align: center;
}

/* ═══════════════════════════════════════════
   Daily Stats (Home)
   ═══════════════════════════════════════════ */

.daily-stats-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-xs);
}

.daily-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-sm);
  text-align: center;
  transition: border-color var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.daily-stat-card:hover { border-color: var(--border-default); }
.daily-stat-card.today {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.daily-stat-date {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-xs);
  font-weight: 500;
}
.daily-stat-card.today .daily-stat-date { color: var(--accent); font-weight: 600; }

.daily-stat-num {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.daily-stat-card.today .daily-stat-num { color: var(--accent); }

.daily-stat-label {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════ */

.footer {
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-4xl);
  padding: var(--space-3xl) var(--space-xl) var(--space-xl);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-xl);
}

.footer-brand strong {
  display: block;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.footer-col a {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════
   Modal / Dialog
   ═══════════════════════════════════════════ */

dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(640px, calc(100vw - 32px));
  max-height: min(82vh, 800px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 0;
  background: var(--bg-surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-in 250ms var(--ease-out);
  color: var(--text-primary);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 200ms var(--ease-out);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-head strong {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
}

#modalBody {
  overflow-y: auto;
  padding: var(--space-xl);
}

/* ═══════════════════════════════════════════
   Detail View
   ═══════════════════════════════════════════ */

.detail-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  line-height: 1.4;
}

.detail-actions {
  display: flex;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}

.detail-actions button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.detail-actions button:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.detail-actions button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.detail-actions button.primary:hover { background: var(--accent-hover); }

.detail-section {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.detail-section:last-child { border-bottom: none; }

.detail-section strong {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-section p,
.detail-section pre {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-line;
  font-family: var(--font-sans);
}

.detail-section a {
  color: var(--accent);
  word-break: break-all;
}
.detail-section a:hover { color: var(--accent-hover); }

/* Detail grid: 2-column metadata */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-field strong {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-field p {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Full-width sections for positions/requirements/link */
.detail-positions,
.detail-requirements,
.detail-link {
  /* spans full width by default */
}

/* ═══════════════════════════════════════════
   Auth / Forms
   ═══════════════════════════════════════════ */

.stack { display: grid; gap: var(--space-md); }

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-sm);
}

.login-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  background: var(--bg-elevated);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.login-tabs button {
  height: 30px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.login-tabs button.active {
  background: var(--bg-surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: grid;
  gap: var(--space-sm);
}

.auth-form input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-root);
  outline: none;
  transition: border-color var(--transition-fast);
}
.auth-form input:focus { border-color: var(--accent); }
.auth-form input::placeholder { color: var(--text-disabled); }

.auth-form button {
  height: 36px;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  background: var(--bg-elevated);
}
.auth-form button.primary { background: var(--accent); color: #fff; }
.auth-form button.primary:hover { background: var(--accent-hover); }

.status-line {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Stack form inputs */
.stack input[type="text"],
.stack input[type="search"],
.stack input[type="password"],
.stack input[type="number"],
.stack textarea,
.stack select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-root);
  outline: none;
  transition: border-color var(--transition-fast);
  width: 100%;
}
.stack input:focus,
.stack textarea:focus,
.stack select:focus { border-color: var(--accent); }
.stack input::placeholder,
.stack textarea::placeholder { color: var(--text-disabled); }

.stack textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
}

/* ═══════════════════════════════════════════
   Admin
   ═══════════════════════════════════════════ */

.nav-link-admin {
  color: var(--danger);
  font-weight: 600;
}
.nav-link-admin:hover { color: var(--danger); background: var(--danger-bg); }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.admin-stat {
  text-align: center;
  padding: var(--space-md);
  background: var(--bg-root);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.admin-stat strong {
  display: block;
  font-size: var(--text-xl);
  color: var(--text-primary);
}
.admin-stat span {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.admin-order-row {
  padding: var(--space-md);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* ═══════════════════════════════════════════
   Feishu Login
   ═══════════════════════════════════════════ */

.feishu-divider {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-align: center;
  padding: var(--space-md) 0;
  position: relative;
}
.feishu-divider::before,
.feishu-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 80px);
  height: 1px;
  background: var(--border-subtle);
}
.feishu-divider::before { left: 0; }
.feishu-divider::after { right: 0; }

.btn-feishu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  width: 100%;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: #fff;
  color: #3370ff;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-feishu:hover {
  border-color: #3370ff;
  background: #f0f5ff;
}
.btn-feishu::before {
  content: "🕊";
  font-size: 1rem;
}

/* ═══════════════════════════════════════════
   Mini Lists
   ═══════════════════════════════════════════ */

.list-mini {
  display: grid;
  gap: var(--space-sm);
  max-height: 420px;
  overflow: auto;
}

.mini-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-root);
  transition: border-color var(--transition-fast);
}
.mini-item:hover { border-color: var(--border-default); }

.mini-item strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 2px;
}

/* Order Cards */
.order-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
}
.order-card + .order-card { margin-top: var(--space-sm); }

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}
.order-card-head strong {
  font-size: var(--text-sm);
  font-weight: 600;
}

.order-card-body {
  display: flex;
  gap: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.order-card-foot {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-xs);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle);
}

.order-badge {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  height: 22px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}
.badge-paid { background: var(--success-bg); color: var(--success); }
.badge-pending { background: var(--warning-bg); color: var(--warning); }

/* Favorite / History Items */
.fav-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: all var(--transition-fast);
}
.fav-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.fav-item strong {
  font-size: var(--text-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fav-item-meta {
  display: flex;
  gap: var(--space-lg);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.fav-item-tag {
  color: var(--accent);
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   QR Code
   ═══════════════════════════════════════════ */

#qrcodeContainer {
  width: 180px;
  height: 180px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-root);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  text-align: center;
}

/* ═══════════════════════════════════════════
   Contact Float
   ═══════════════════════════════════════════ */

.contact-float {
  position: fixed;
  right: var(--space-xl);
  bottom: var(--space-xl);
  z-index: 50;
}

.contact-float button {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}
.contact-float button:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

/* ═══════════════════════════════════════════
   Skeleton
   ═══════════════════════════════════════════ */

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-overlay) 50%, var(--bg-elevated) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ═══════════════════════════════════════════
   Utilities
   ═══════════════════════════════════════════ */

.hidden { display: none !important; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-bg);
}

/* ═══════════════════════════════════════════
   Responsive: Tablet (≤960px)
   ═══════════════════════════════════════════ */

@media (max-width: 960px) {
  .navbar-inner { gap: var(--space-md); padding: 0 var(--space-lg); }
  .nav-links { gap: 0; }
  .nav-link { padding: 0 10px; font-size: var(--text-xs); }

  .feature-grid { grid-template-columns: repeat(2, 1fr); }

  .hero { padding: var(--space-2xl) 0; }
  .hero h1 { font-size: var(--text-3xl); }
  .hero-stats { gap: var(--space-xl); flex-wrap: wrap; }

  .job-header { display: none; }
  .job-card { flex-wrap: wrap; padding: var(--space-md); gap: var(--space-xs); }
  .job-card-title { flex: 1 1 100%; }
  .job-card-positions { flex: 1 1 100%; }
  .job-card-meta { white-space: normal; }
  .jmc-location, .jmc-update, .jmc-publish, .jmc-deadline, .jmc-nature { flex: auto; width: auto; }
  .job-card-status { flex: 0; }

  .daily-stats-grid { grid-template-columns: repeat(4, 1fr); }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .page-content { padding: var(--space-xl) var(--space-lg); }

  .filter-bar { gap: var(--space-sm); }
  .filter-search { width: 140px; }
  .filter-select { width: 110px; }
}

/* ═══════════════════════════════════════════
   Responsive: Mobile (≤560px)
   ═══════════════════════════════════════════ */

@media (max-width: 560px) {
  :root { --navbar-height: 50px; }

  .navbar-inner { gap: var(--space-sm); }
  .logo-text { display: none; }
  .nav-link { padding: 0 8px; font-size: 11px; }
  .nav-actions { gap: var(--space-xs); }
  #loginButton { max-width: 80px; }

  .hero { padding: var(--space-xl) 0; }
  .hero h1 { font-size: var(--text-2xl); }
  .hero-desc { font-size: var(--text-sm); }
  .hero-actions { flex-direction: column; }
  .hero-stats { gap: var(--space-md); }
  .stat-item { flex: 1; }
  .stat-num { font-size: var(--text-2xl); }

  .feature-grid { grid-template-columns: 1fr; }

  .inline-tabs { width: 100%; }
  .itab { flex: 1; justify-content: center; padding: 0 10px; }

  .daily-stats-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { grid-template-columns: 1fr; gap: var(--space-xl); }
  .page-content { padding: var(--space-lg) var(--space-md); }
  .section-head { flex-direction: column; gap: var(--space-xs); }

  .contact-float { right: var(--space-md); bottom: var(--space-md); }

  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-search, .filter-select { width: 100%; }

  dialog { width: calc(100vw - 16px); border-radius: var(--radius-lg); }

  .detail-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   Reduced Motion
   ═══════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}
