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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --max-w: 1200px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Noto Sans SC', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
main { flex: 1; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

#site-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-text { font-size: 22px; font-weight: 700; }
.nav { display: flex; gap: 8px; flex: 1; }
.nav-link { padding: 8px 14px; border-radius: 8px; color: var(--text-muted); font-size: 14px; text-decoration: none; }
.nav-link:hover, .nav-link.is-active { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.header-actions { flex-shrink: 0; }
.user-pill { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.logout-link { font-size: 13px; color: var(--text-muted); margin-left: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: 8px; font-size: 15px; font-weight: 600; border: none; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); text-decoration: none; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }

.hero { background: linear-gradient(135deg, #1e40af, var(--primary)); color: #fff; padding: 64px 0; }
.hero-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; text-align: center; }
.hero h1 { font-size: 42px; margin-bottom: 12px; }
.hero p { font-size: 18px; opacity: 0.9; margin-bottom: 32px; }
.search-box { max-width: 720px; margin: 0 auto; display: flex; gap: 12px; }
.search-box input { flex: 1; padding: 14px 18px; border: none; border-radius: 8px; font-size: 16px; outline: none; }
.search-box select { padding: 14px; border: none; border-radius: 8px; font-size: 15px; }

.stats-bar { background: var(--card); border-bottom: 1px solid var(--border); padding: 28px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stat-item strong { display: block; font-size: 32px; color: var(--primary); }
.stat-item span { font-size: 14px; color: var(--text-muted); }

.section { padding: 48px 0; }
.section-title { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.section-desc { color: var(--text-muted); margin-bottom: 28px; }

.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-item { background: var(--card); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border); color: inherit; text-decoration: none; transition: transform 0.15s; }
.cat-item:hover { transform: translateY(-2px); text-decoration: none; }
.cat-icon { font-size: 28px; margin-bottom: 8px; }
.cat-name { font-size: 14px; font-weight: 600; }

.job-list { display: flex; flex-direction: column; gap: 12px; }
.job-card { background: var(--card); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); border: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 20px; color: inherit; text-decoration: none; transition: transform 0.15s; }
.job-card:hover { transform: translateY(-1px); text-decoration: none; }
.job-card h3 { font-size: 17px; margin-bottom: 6px; color: var(--text); }
.job-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-muted); }
.job-salary { font-size: 18px; font-weight: 700; color: #f97316; white-space: nowrap; }
.job-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; background: var(--primary-light); color: var(--primary); }

.company-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.company-card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--border); display: flex; gap: 16px; align-items: center; }
.company-card img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.company-card h3 { font-size: 16px; margin-bottom: 4px; }
.company-meta { font-size: 13px; color: var(--text-muted); }

.page-header { padding: 36px 0 20px; }
.page-header h1 { font-size: 30px; margin-bottom: 8px; }
.filter-bar { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-bar input, .filter-bar select { padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; }
.filter-bar input { flex: 1; min-width: 200px; }

.breadcrumb { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.job-detail { background: var(--card); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.job-detail h1 { font-size: 28px; margin-bottom: 12px; }
.job-detail-meta { display: flex; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.job-detail-body { white-space: pre-wrap; line-height: 1.9; color: #374151; font-size: 15px; }
.apply-bar { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; }

.form-card { max-width: 560px; margin: 0 auto; background: var(--card); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; outline: none; font-family: inherit; }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-error { color: #dc2626; font-size: 13px; margin-top: 6px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }

.prose { background: var(--card); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.prose h2 { font-size: 20px; margin: 28px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 15px; color: #374151; margin-bottom: 10px; line-height: 1.8; }
.prose h3 { font-size: 16px; margin: 20px 0 8px; color: #1f2937; }
.prose ol { padding-left: 24px; margin-bottom: 12px; }
.prose .legal-meta { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.prose .legal-toc { background: #f8fafc; border-radius: 8px; padding: 16px 20px; margin-bottom: 24px; }
.prose .legal-toc a { color: var(--primary); font-size: 14px; display: block; margin-bottom: 6px; }
.info-row { display: flex; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.info-row dt { width: 180px; color: var(--text-muted); flex-shrink: 0; }

#site-footer { background: #0f172a; color: #94a3b8; padding: 40px 0 24px; margin-top: auto; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; text-align: center; }
.footer-brand { margin-bottom: 12px; }
.footer-brand strong { color: #f1f5f9; font-size: 18px; display: block; }
.footer-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; margin-bottom: 12px; }
.footer-meta a { color: #cbd5e1; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 12px; }
.footer-links a { color: #94a3b8; font-size: 14px; }
.footer-copy { font-size: 12px; color: #64748b; }
.empty-state { text-align: center; padding: 48px; color: var(--text-muted); }

@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .company-grid { grid-template-columns: 1fr; }
  .job-card { flex-direction: column; align-items: flex-start; }
}
