:root {
  --ink: #10241c;
  --muted: #4a6358;
  --bg: #e8f0eb;
  --panel: #f7fbf8;
  --line: #c5d6cc;
  --brand: #0b3d2e;
  --brand-2: #1a6b4f;
  --accent: #d97706;
  --danger: #b42318;
  --ok: #067647;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 61, 46, 0.08);
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #cfe6da 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #f3e0c4 0%, transparent 50%),
    linear-gradient(180deg, #f3f7f4 0%, var(--bg) 100%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(11, 61, 46, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 61, 46, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  z-index: 0;
}

.site-header,
.wrap,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  padding: 18px 16px 8px;
  max-width: 720px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  color: #fff;
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 8px 18px rgba(11, 61, 46, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.brand-text em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
}

.wrap {
  width: min(720px, calc(100% - 24px));
  margin: 0 auto 40px;
}

body.is-wide .site-header,
body.is-wide .wrap {
  max-width: none;
  width: min(1280px, calc(100% - 32px));
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0 16px 28px;
}

.hero-band {
  margin: 8px 0 18px;
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(11, 61, 46, 0.95), rgba(26, 107, 79, 0.9)),
    #0b3d2e;
  color: #f4faf7;
  box-shadow: var(--shadow);
  animation: rise 0.45s ease-out;
}

.hero-band h1 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.hero-band p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.92rem;
  line-height: 1.5;
}

.apply-form fieldset {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  margin: 0 0 14px;
  padding: 14px 14px 6px;
  box-shadow: var(--shadow);
  animation: rise 0.5s ease-out;
}

.apply-form legend {
  padding: 0 8px;
  font-weight: 700;
  color: var(--brand);
  font-size: 0.95rem;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 0.86rem;
  margin-bottom: 6px;
  color: var(--muted);
  font-weight: 500;
}

.field label span {
  color: var(--accent);
}

.field input,
.field select,
.field textarea,
.search-bar input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 12px;
  font: inherit;
  font-size: 16px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-bar input:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(26, 107, 79, 0.15);
}

.field input[readonly] {
  background: #eef4f0;
  color: var(--muted);
  cursor: default;
}

/* —— 求职者登录 —— */
.login-hero {
  margin: 8px 0 16px;
  padding: 20px 18px 16px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(11, 61, 46, 0.95), rgba(26, 107, 79, 0.9)),
    #0b3d2e;
  color: #f4faf7;
  box-shadow: var(--shadow);
  animation: rise 0.45s ease-out;
}

.login-hero h1 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.login-hero p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.92rem;
  line-height: 1.5;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  box-shadow: var(--shadow);
  animation: rise 0.5s ease-out;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.btn-code {
  appearance: none;
  border: 1px solid var(--brand-2);
  background: #e8f6ef;
  color: var(--brand);
  border-radius: 10px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  min-width: 7.5em;
  transition: opacity 0.15s, background 0.15s;
}

.btn-code:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: var(--line);
  background: #f0f4f2;
  color: var(--muted);
}

.login-msg {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.login-msg.is-error {
  background: #fef3f2;
  color: var(--danger);
  border: 1px solid #fecdca;
}

.login-msg.is-ok {
  background: #e8f8ef;
  color: var(--ok);
  border: 1px solid #abeFc6;
}

.login-msg.is-info {
  background: #eef5f1;
  color: var(--brand);
  border: 1px solid var(--line);
}

.hero-band .hero-logout {
  margin-left: 8px;
  color: #fde68a;
  text-decoration: underline;
  font-size: 0.85rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.seg-item {
  position: relative;
}

.seg-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg-item span {
  display: block;
  text-align: center;
  padding: 11px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
}

.seg-item input:checked + span {
  border-color: var(--brand-2);
  background: #e5f3ec;
  color: var(--brand);
}

.btn-submit,
.btn-primary,
.search-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(11, 61, 46, 0.22);
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn-submit:active,
.btn-primary:active,
.search-bar button:active {
  transform: translateY(1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-tip {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 10px 0 0;
}

.flash-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.flash {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.flash-error {
  background: #fef3f2;
  color: var(--danger);
  border: 1px solid #fecdca;
}

.flash-ok {
  background: #ecfdf3;
  color: #067647;
  border: 1px solid #abefc6;
}

.channel-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  text-decoration: none;
  font-size: 0.85rem;
  border: 1px solid #e5e7eb;
}

.channel-chip strong {
  color: #0b3d2e;
}

.channel-chip.is-active {
  background: #0b3d2e;
  color: #fff;
  border-color: #0b3d2e;
}

.channel-chip.is-active strong {
  color: #fff;
}

.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
}

.meta-badge.meta-lib {
  border-color: #86efac;
  background: #ecfdf3;
  color: #067647;
}

.meta-badge.meta-ch {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.flash-list-inline {
  margin: 0 0 14px;
}

.field.is-error input {
  border-color: var(--danger);
}

.field-error {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--danger);
  line-height: 1.4;
}

.realname-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 61, 46, 0.55);
  backdrop-filter: blur(2px);
}

.realname-loading[hidden] {
  display: none !important;
}

body.is-realname-loading {
  overflow: hidden;
}

.realname-loading-card {
  width: min(86vw, 280px);
  text-align: center;
  background: #fff;
  border-radius: 16px;
  padding: 28px 20px 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.realname-loading-card p {
  margin: 16px 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0b3d2e;
}

.realname-loading-card span {
  font-size: 0.82rem;
  color: #667;
}

.realname-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border: 3px solid #d7ebe3;
  border-top-color: #0b3d2e;
  border-radius: 50%;
  animation: realname-spin 0.8s linear infinite;
}

@keyframes realname-spin {
  to {
    transform: rotate(360deg);
  }
}

.result-card,
.qr-panel,
.admin-login {
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 28px 20px;
  box-shadow: var(--shadow);
  animation: rise 0.45s ease-out;
}

.result-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8f8ef;
  color: var(--ok);
  font-size: 1.8rem;
  font-weight: 900;
  animation: pop 0.4s ease-out 0.1s both;
}

.result-card h1,
.qr-panel h1,
.admin-login h1,
.admin-head h1 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.result-card p,
.qr-panel p,
.admin-login p,
.admin-head p {
  margin: 0;
  color: var(--muted);
}

.result-actions {
  margin-top: 20px;
}

.qr-frame {
  margin: 18px auto;
  width: fit-content;
  padding: 14px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.qr-frame img {
  display: block;
  width: min(260px, 70vw);
  height: auto;
}

.qr-hint {
  margin: 0 0 16px !important;
  font-size: 0.88rem;
}

.login-form {
  margin-top: 18px;
  text-align: left;
}

.field-caption {
  display: block;
  font-size: 0.86rem;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 500;
}

.radio-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink) !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  cursor: pointer;
}

.radio-row input[type="radio"] {
  width: 18px !important;
  height: 18px;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.radio-row span {
  color: inherit !important;
}

.admin-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}

.admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-tools .btn-danger-ghost {
  color: #b42318;
  border-color: #fecdca;
  background: #fef3f2;
  cursor: pointer;
  font: inherit;
}

.admin-tools .btn-danger-ghost:hover {
  background: #fee4e2;
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 14px;
}

.search-bar button {
  width: auto;
  padding-inline: 18px;
  font-size: 0.95rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 760px;
}

.data-table-admin {
  min-width: 1100px;
  table-layout: auto;
}

.data-table-admin th,
.data-table-admin td {
  padding: 12px 14px;
  white-space: nowrap;
}

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

.data-table th {
  background: #eef5f1;
  color: var(--brand);
  font-weight: 700;
  white-space: nowrap;
}

.data-table a {
  color: var(--brand-2);
  text-decoration: none;
  font-weight: 600;
}

.detail-box {
  margin-top: 8px;
  padding: 8px 10px;
  background: #f4f8f6;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.detail-box p {
  margin: 4px 0;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px;
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* —— 可到岗日期选择器 —— */
.date-picker {
  display: grid;
  gap: 10px;
}

.date-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.date-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}

.date-chip:active {
  transform: scale(0.97);
}

.date-chip.is-active {
  border-color: var(--brand-2);
  background: linear-gradient(135deg, #e8f6ef, #d7eee3);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(26, 107, 79, 0.12);
}

.date-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.date-picker.is-open .date-trigger {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(26, 107, 79, 0.15);
}

.date-trigger-icon {
  display: grid;
  place-items: center;
  color: var(--brand-2);
  flex-shrink: 0;
}

.date-trigger-text {
  flex: 1;
  font-weight: 600;
  line-height: 1.3;
}

.date-trigger-text.is-placeholder {
  font-weight: 500;
  color: #7a9085;
}

.date-trigger-clear {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.date-trigger-clear:hover {
  background: #eef4f0;
  color: var(--ink);
}

.date-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 16px 36px rgba(11, 61, 46, 0.12);
  animation: rise 0.22s ease-out;
}

.date-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.date-month {
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.04em;
}

.date-nav {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #eef5f1;
  color: var(--brand);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.date-nav:active {
  background: #dceae3;
}

.date-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.date-day {
  appearance: none;
  border: 0;
  background: transparent;
  aspect-ratio: 1;
  border-radius: 12px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.date-day:hover:not(:disabled) {
  background: #e8f3ed;
}

.date-day.is-muted,
.date-day.is-past {
  color: #b0c0b7;
  cursor: default;
}

.date-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1.5px var(--brand-2);
  color: var(--brand);
}

.date-day.is-selected {
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 6px 14px rgba(11, 61, 46, 0.22);
}

@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .date-quick {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .date-chip {
    font-size: 0.82rem;
    padding: 9px 0;
  }
}
