:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --ink: #15231c;
  --muted: #5b6b63;
  --line: #dde7e1;
  --brand: #1f6b4a;
  --brand-dark: #164c35;
  --accent: #c27803;
  --soft: #e8f5ef;
  --danger: #b42318;
  --shadow: 0 12px 28px rgba(21, 50, 36, 0.08);
  --radius: 14px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Georgia", "Songti SC", "SimSun", serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(31, 107, 74, 0.12), transparent 60%),
    radial-gradient(700px 360px at 100% 10%, rgba(194, 120, 3, 0.1), transparent 55%),
    linear-gradient(180deg, #eef5f1, var(--bg) 45%, #eef2f0);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }

.topbar {
  background: #143528;
  color: #d7ebe1;
  font-size: 13px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  flex-wrap: wrap;
  align-items: center;
}
.topbar a { color: #cfe8db; }
.topbar a:hover { color: #fff; }
.topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.topbar .auth-area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 0;
}
.topbar .auth-btn {
  padding: 4px 12px;
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #e8f6ef;
  font-size: 12px;
}
.topbar .auth-btn-primary {
  background: #2f8f64;
  border-color: #2f8f64;
  color: #fff;
}
.topbar .auth-user { color: #cfe8db; max-width: 140px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(145deg, #1f6b4a, #0f3d2c);
  color: #fff; display: grid; place-items: center; font-weight: 700;
  font-family: var(--display);
}
.brand strong { display: block; font-size: 18px; font-family: var(--display); }
.brand span { display: block; font-size: 12px; color: var(--muted); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a {
  padding: 8px 12px; border-radius: 999px; color: var(--muted); white-space: nowrap;
}
.nav a.active, .nav a:hover {
  background: var(--soft); color: var(--brand-dark);
}
.auth-area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.auth-user {
  font-size: 13px;
  color: var(--muted);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
}
.auth-btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  padding: 28px 0 8px;
}
.hero-main {
  padding: 30px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(232,245,239,0.9));
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: var(--shadow);
}
.hero-main .eyebrow { color: var(--brand); font-weight: 600; margin-bottom: 8px; }
.hero-main h1 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.2;
}
.hero-main p { margin: 0 0 18px; color: var(--muted); line-height: 1.7; max-width: 46ch; }
.hero-side {
  border-radius: 18px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(160deg, #1f6b4a, #0f3d2c 60%, #245c40);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 260px;
  position: relative;
  overflow: hidden;
}
.hero-side::before {
  content: "";
  position: absolute;
  width: 180px; height: 180px; border-radius: 40px;
  right: -30px; top: -20px;
  background: rgba(255,255,255,0.08);
  transform: rotate(18deg);
  animation: drift 6s ease-in-out infinite;
}
@keyframes drift {
  0%,100% { transform: rotate(18deg) translateY(0); }
  50% { transform: rotate(22deg) translateY(10px); }
}
.hero-side h2, .hero-side p { position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #fff; border-color: var(--line); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-sm { padding: 8px 12px; font-size: 13px; }

.section { padding: 26px 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px;
}
.section-head h2 { margin: 0; font-family: var(--display); font-size: 26px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.stat strong { display: block; font-size: 24px; color: var(--brand-dark); }
.stat span { color: var(--muted); font-size: 13px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 14px; cursor: pointer; color: var(--muted);
}
.chip.active, .chip:hover { background: var(--soft); color: var(--brand-dark); border-color: #b7d8c8; }

.job-list { display: grid; gap: 12px; }
.job-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.job-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.job-card h3 { margin: 0 0 6px; font-size: 18px; }
.meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.salary { color: var(--accent); font-weight: 700; font-size: 18px; text-align: right; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  background: var(--soft); color: var(--brand-dark); border-radius: 999px;
  padding: 4px 10px; font-size: 12px;
}
.job-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.page-title { padding: 22px 0 8px; }
.page-title h1 { margin: 0 0 6px; font-family: var(--display); font-size: 30px; }
.page-title p { margin: 0; color: var(--muted); }

.layout-2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.field {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; outline: none; background: #fff;
}
.field:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,107,74,.12); }
textarea.field { min-height: 120px; resize: vertical; }
.notice {
  background: #fff7ed; color: #9a3412; border-radius: 10px; padding: 12px 14px;
  margin-bottom: 14px; font-size: 14px;
}
.muted { color: var(--muted); }
.success-box { text-align: center; padding: 40px 16px; }
.success-box h2 { color: var(--brand); }

.detail-head {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.block { margin: 18px 0; }
.block h3 { margin: 0 0 8px; }
.block p, .block li { line-height: 1.8; color: var(--muted); }

.site-footer {
  margin-top: 40px; background: #10261c; color: #cfe0d7; padding: 34px 0 18px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 16px; }
.site-footer h4 { margin: 0 0 10px; color: #fff; }
.site-footer a { display: block; margin: 6px 0; color: #b7ccc1; }
.site-footer p { color: #9fb5aa; line-height: 1.7; font-size: 14px; }
.copyright {
  margin-top: 22px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: #8ea69b;
}
.copyright a { color: #a8c4b6; display: inline; margin: 0; }
.copyright a:hover { color: #fff; text-decoration: underline; }

.auth-panel { max-width: 460px; margin: 0 auto; }
.auth-switch { margin-top: 14px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-switch a { color: var(--brand); font-weight: 600; }
.fee-table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; }
.fee-table th, .fee-table td {
  border: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top;
}
.fee-table th { background: #f5faf7; width: 28%; color: var(--muted); font-weight: 600; }
.pay-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 18px; }
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 14px; }
.admin-side { align-self: start; }
.admin-menu {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 10px 12px; border-radius: 10px; color: var(--muted); cursor: pointer; margin-bottom: 4px;
}
.admin-menu:hover, .admin-menu.active { background: var(--soft); color: var(--brand-dark); }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-actions button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 4px 10px; cursor: pointer; color: var(--muted); font-size: 12px;
}
.status-pill {
  display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12px;
  background: var(--soft); color: var(--brand-dark);
}
.status-pill.pending { background: #fff7ed; color: #9a3412; }
.status-pill.ok { background: var(--soft); color: var(--brand-dark); }
.article-panel { max-width: 900px; margin: 0 auto; }
.article-panel h3 { margin: 22px 0 8px; }
.article-panel p, .article-panel li { line-height: 1.85; color: var(--muted); }
.toast {
  position: fixed; right: 18px; bottom: 18px; background: #123; color: #fff;
  padding: 12px 16px; border-radius: 10px; opacity: 0; transform: translateY(8px);
  transition: .25s ease; z-index: 50; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

@media (max-width: 900px) {
  .hero, .layout-2, .footer-grid, .admin-layout { grid-template-columns: 1fr; }
  .stats, .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .job-card { grid-template-columns: 1fr; }
  .job-side { align-items: flex-start; }
  .salary { text-align: left; }
}
@media (max-width: 560px) {
  .stats, .form-grid, .admin-stats { grid-template-columns: 1fr; }
  .header-row { flex-direction: column; align-items: flex-start; }
  .auth-area { margin-left: 0; }
  .auth-user { display: none; }
}
