:root {
  --bg: #eef3f6;
  --panel: #ffffff;
  --panel-soft: #f6fbfb;
  --text: #18313d;
  --muted: #5d7380;
  --line: #d7e1e8;
  --brand: #0d6e6e;
  --brand-strong: #094b4b;
  --accent: #ef7c35;
  --danger: #bf3d32;
  --shadow: 0 16px 40px rgba(15, 51, 63, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --font-base: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-head: "DIN Alternate", "Bahnschrift", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(13, 110, 110, 0.14), transparent 32%),
    linear-gradient(180deg, #f6fafb 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.primary-link,
.inline-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 10px 24px rgba(9, 75, 75, 0.18);
}

button:hover,
.primary-link:hover,
.inline-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  background: #fff;
  color: var(--brand-strong);
  border: 1px solid var(--line);
  box-shadow: none;
}

.danger-button {
  background: transparent;
  color: var(--danger);
  padding: 0;
  box-shadow: none;
}

.site-header,
.site-footer,
.site-main,
.admin-main,
.login-card {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand,
.admin-brand {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
}

.site-nav,
.admin-menu {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.site-nav a,
.admin-menu a {
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
}

.site-nav a.is-active,
.admin-menu a.is-active {
  background: rgba(13, 110, 110, 0.1);
  color: var(--brand-strong);
}

.site-main,
.admin-main {
  padding-bottom: 40px;
}

.site-footer {
  padding: 24px 0 48px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.hero-section {
  background:
    linear-gradient(135deg, rgba(9, 75, 75, 0.94), rgba(13, 110, 110, 0.82)),
    linear-gradient(180deg, rgba(239, 124, 53, 0.18), transparent);
  color: #fff;
  border-radius: 28px;
  padding: 28px;
  min-height: 260px;
  display: flex;
  align-items: end;
  box-shadow: var(--shadow);
}

.hero-copy {
  width: min(640px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d8f2f2;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 12px;
}

.detail-type-list,
.job-type-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-copy h1,
.detail-head h1,
.admin-topbar h1 {
  font-family: var(--font-head);
  margin: 10px 0 12px;
  line-height: 1.05;
}

.hero-copy h1 {
  font-size: clamp(36px, 8vw, 60px);
}

.hero-copy p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-search,
.filter-panel,
.stack-form,
.job-form,
.ai-panel,
.section-card,
.detail-card,
.login-card,
.stat-card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-search {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
}

.section-card,
.detail-card,
.stat-card {
  padding: 22px;
  margin-top: 18px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title-row h1,
.section-title-row h2,
.section-title-row h3 {
  margin: 0;
}

.chip-grid,
.job-list-grid,
.stats-grid,
.form-grid,
.button-row,
.checkbox-row {
  display: grid;
  gap: 12px;
}

.chip-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.job-chip {
  background: linear-gradient(135deg, rgba(13, 110, 110, 0.08), rgba(239, 124, 53, 0.08));
  border: 1px solid rgba(13, 110, 110, 0.15);
  border-radius: 18px;
  padding: 16px;
  color: var(--brand-strong);
}

.job-list-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.job-card {
  background: #fff;
  border: 1px solid rgba(17, 54, 72, 0.08);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(17, 54, 72, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(17, 54, 72, 0.12);
}

.job-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #2d7fb3;
}

.job-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid #e9eef2;
}

.job-card-role {
  min-width: 0;
}

.job-card-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  color: #233848;
}

.job-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #2d7fb3;
  font-size: 13px;
  white-space: nowrap;
}

.job-card-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
}

.job-meta-item {
  color: #637786;
  font-size: 14px;
}

.job-meta-item.emphasis {
  color: #da6f2d;
  font-weight: 600;
}

.job-card-desc {
  color: #657886;
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 72px;
}

.job-card-contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid #e9eef2;
}

.job-contact-info {
  color: #657886;
  font-size: 14px;
  line-height: 1.6;
}

.job-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: end;
}

.card-link-button,
.section-title-row a {
  color: var(--brand);
  font-weight: 600;
}

.card-link-button {
  color: var(--brand-strong);
  padding: 10px 14px;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: #22b468;
  color: #fff;
  font-weight: 600;
}

.filter-panel,
.stack-form,
.job-form {
  padding: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: center;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
}

textarea {
  resize: vertical;
}

.flash {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 16px;
}

.flash-success {
  background: rgba(13, 110, 110, 0.08);
  color: var(--brand-strong);
}

.flash-error {
  background: rgba(191, 61, 50, 0.08);
  color: #943126;
}

.detail-head,
.detail-grid {
  display: grid;
  gap: 18px;
}

.detail-head {
  grid-template-columns: 1.5fr 1fr;
  align-items: end;
}

.detail-side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: end;
}

.detail-side-tags span {
  background: rgba(13, 110, 110, 0.08);
  padding: 8px 12px;
  border-radius: 999px;
}

.detail-grid {
  grid-template-columns: 2fr 1fr;
  margin-top: 18px;
}

.detail-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.detail-section h2 {
  margin-top: 0;
}

.contact-box {
  background: linear-gradient(180deg, rgba(13, 110, 110, 0.06), rgba(239, 124, 53, 0.05));
  border-radius: 18px;
  padding: 18px;
  position: sticky;
  top: 20px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-card {
  padding: 32px;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.admin-sidebar {
  background: #0c2230;
  color: #d8e7ec;
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 20px;
}

.admin-menu {
  display: grid;
  gap: 8px;
}

.admin-menu a {
  color: #d8e7ec;
}

.admin-menu a.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.admin-main {
  width: auto;
  margin: 0;
  padding: 24px;
}

.admin-topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  margin-top: 10px;
  display: block;
  font-size: 34px;
  font-family: var(--font-head);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.table-actions form {
  margin: 0;
}

.table-toolbar,
.button-row,
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

.form-grid .full-span {
  grid-column: 1 / -1;
}

.ai-panel {
  margin: 18px 0;
  padding: 18px;
}

.helper-text,
.empty-state,
.empty-cell {
  color: var(--muted);
}

.centered-card {
  text-align: center;
}

.full-width {
  width: 100%;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    gap: 14px;
  }

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

  .detail-side-tags {
    justify-content: start;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  .site-main,
  .login-card {
    width: min(100vw - 20px, 1120px);
  }

  .site-header {
    display: grid;
    gap: 12px;
  }

  .brand,
  .admin-brand {
    font-size: 24px;
  }

  .hero-section {
    padding: 20px;
    min-height: 220px;
  }

  .hero-search,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .job-card-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .job-card-contact,
  .job-card-actions,
  .job-card-meta-line {
    display: grid;
    justify-content: stretch;
  }

  .section-card,
  .detail-card,
  .stat-card,
  .stack-form,
  .job-form {
    padding: 18px;
  }

  .admin-main {
    padding: 16px;
  }
}
