:root {
  --brand: #0f5132;
  --brand-2: #1f7a4d;
  --brand-3: #dff3e6;
  --ink: #17202a;
  --muted: #667085;
  --soft: #f4f7f4;
  --card: #ffffff;
  --line: #e3e8e2;
  --line-strong: #cdd7cd;
  --red: #c0392b;
  --red-soft: #fdecea;
  --amber: #a16207;
  --amber-soft: #fff7df;
  --green: #1f7a4d;
  --green-soft: #e8f6ee;
  --blue: #1d4ed8;
  --shadow: 0 18px 60px rgba(15, 81, 50, 0.10);
  --radius: 18px;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: .01em; }
code, pre { font-family: "Cascadia Code", Consolas, monospace; }
::selection { background: #c9ead7; }

.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- shared controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 11px;
  border: 1px solid transparent; background: var(--brand); color: #fff;
  font-weight: 700; font-size: 14px; transition: .18s ease;
  text-decoration: none !important; white-space: nowrap;
}
.btn:hover { background: #0b4028; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 17px; border-radius: 14px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--soft); }
.btn-soft { background: var(--brand-3); color: var(--brand); }
.btn-soft:hover { background: #ccebd8; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #9f2d22; }
.btn-amber { background: var(--amber); }
.btn-amber:hover { background: #854d06; }
.btn-block { width: 100%; }
.btn .ico { width: 18px; height: 18px; flex: 0 0 auto; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--ink); padding: 11px 13px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(31, 122, 77, .12);
}
.textarea { min-height: 92px; resize: vertical; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }

.icon-warn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.icon-warn svg { width: 1.1em; height: 1.1em; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  line-height: 1.5; white-space: nowrap;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-gray { background: #eef1ef; color: #475467; }
.badge-blue { background: #e8efff; color: var(--blue); }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- public ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 81, 50, .10);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none !important; }
.brand-seal {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 26%, #2f9566, var(--brand) 70%);
  color: #fff; font-family: var(--serif); font-weight: 800; font-size: 13px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
  letter-spacing: .04em;
}
.brand-logo { width: 42px; height: 42px; border-radius: 50%; object-fit: contain; flex: 0 0 auto; display: block; }
.brand-name { font-weight: 800; font-size: 15px; line-height: 1.25; }
.brand-sub { color: var(--muted); font-size: 11.5px; letter-spacing: .08em; }
.header-links { display: flex; gap: 18px; align-items: center; font-size: 13.5px; }
.header-links a { color: #344054; }

.hero { padding: 54px 0 26px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -140px -80px auto auto; width: 520px; height: 520px;
  border-radius: 50%; background: radial-gradient(circle, rgba(31, 122, 77, .16), transparent 68%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.03fr .97fr; gap: 46px; align-items: center; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; color: var(--brand);
  font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--brand-2); }
.hero h1 { font-size: clamp(34px, 4.5vw, 54px); line-height: 1.18; margin-bottom: 18px; font-weight: 800; }
.hero h1 span { color: var(--brand-2); }
.hero-lead { font-size: 16px; color: #475467; max-width: 560px; margin-bottom: 26px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 20px; padding: 0; margin: 0 0 26px; list-style: none; color: #344054; font-size: 13.5px; }
.hero-points li { display: flex; gap: 7px; align-items: center; }
.check-dot {
  width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--brand-3); color: var(--brand); font-size: 11px; font-weight: 900;
}
.hero-note {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px;
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--brand-2);
  border-radius: 10px; color: #475467; font-size: 13px; max-width: 560px;
}

.upload-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 28px; box-shadow: var(--shadow); animation: rise .5s ease both;
}
.upload-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.upload-card h2 { font-size: 24px; margin-bottom: 4px; }
.upload-card .sub { color: var(--muted); font-size: 13px; }
.step-pill { background: var(--brand-3); color: var(--brand); border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.upload-zone {
  border: 1.5px dashed #b9c9bd; border-radius: 15px; background: #fbfdfb;
  padding: 34px 20px; text-align: center; transition: .2s ease;
}
.upload-zone:hover { border-color: var(--brand-2); background: #f5fbf7; }
.upload-zone.is-busy { pointer-events: none; opacity: .7; }
.upload-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px;
  display: grid; place-items: center; color: var(--brand); background: var(--brand-3);
}
.upload-icon svg { width: 30px; height: 30px; }
.upload-zone h3 { font-family: var(--sans); font-size: 18px; margin-bottom: 6px; }
.upload-zone p { margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.format-card {
  border: 1px solid var(--line); background: #fff; border-radius: 13px; padding: 14px 10px;
  text-align: center; transition: .18s ease; color: var(--ink);
}
.format-card:hover { border-color: var(--brand-2); box-shadow: 0 6px 20px rgba(15, 81, 50, .08); transform: translateY(-2px); }
.format-card .fmt-icon { width: 34px; height: 34px; margin: 0 auto 7px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; font-size: 11px; }
.fmt-word { background: #e8efff; color: #1d4ed8; }
.fmt-pdf { background: #fdecea; color: #c0392b; }
.fmt-img { background: #fff4d6; color: #a16207; }
.format-card strong { display: block; font-size: 13px; }
.format-card small { color: var(--muted); font-size: 11px; }
.upload-foot { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 16px; color: var(--muted); font-size: 12px; }
.link-btn { border: 0; background: none; color: var(--brand-2); font-weight: 700; padding: 0; font-size: 12.5px; }
.link-btn:hover { text-decoration: underline; }

.progress-wrap { margin-top: 16px; }
.progress-track { height: 8px; background: #edf1ee; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-2), #48a978); transition: width .25s ease; }
.progress-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 7px; }

.selected-file {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.selected-file .file-badge { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-3); color: var(--brand); font-weight: 900; font-size: 10px; }
.selected-file .grow { min-width: 0; flex: 1; }
.selected-file .name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file .meta { font-size: 11.5px; color: var(--muted); }

.result {
  margin-top: 18px; border-radius: 15px; border: 1px solid var(--line);
  padding: 18px; animation: rise .35s ease both;
}
.result-red { border-color: #f3b9b2; background: var(--red-soft); }
.result-yellow { border-color: #f0d38b; background: var(--amber-soft); }
.result-green { border-color: #b7dfc7; background: var(--green-soft); }
.result-head { display: flex; gap: 12px; align-items: flex-start; position: relative; }
.result-head.with-close { padding-right: 32px; }
.result-close {
  position: absolute; right: 0; top: 0; z-index: 2; width: 30px; height: 30px;
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .72); color: #475467;
}
.result-close:hover { background: #fff; color: var(--ink); }
.result-close svg { width: 16px; height: 16px; }
.result-symbol { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; color: #fff; }
.result-red .result-symbol { background: var(--red); }
.result-yellow .result-symbol { background: var(--amber); }
.result-green .result-symbol { background: var(--green); }
.result-symbol svg { width: 24px; height: 24px; }
.result h3 { font-family: var(--sans); font-size: 17px; margin: 1px 0 4px; }
.result-red h3, .result-red .result-title { color: #8e241a; }
.result-yellow h3, .result-yellow .result-title { color: #7a4a05; }
.result-green h3 { color: #145c39; }
.result p { margin-bottom: 0; font-size: 13.5px; color: #475467; }
.result-review-note {
  margin: 12px 0 0; padding: 11px 14px; border: 1px solid #f0c9c2;
  border-left: 4px solid var(--red); border-radius: 8px; background: #fff;
}
.result-review-note strong { display: block; font-size: 12px; color: #9b2c20; margin-bottom: 4px; }
.result-review-note p { font-size: 13.5px; line-height: 1.75; color: #3f3a36; white-space: pre-wrap; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.result-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(9, 24, 16, .55);
  backdrop-filter: blur(2px); animation: fadeIn .16s ease both;
}
.result.result-popup {
  position: fixed; z-index: 100; left: 50%; top: 50%; margin: 0;
  width: min(660px, calc(100% - 32px)); max-height: min(86vh, 860px);
  overflow-y: auto; transform: translate(-50%, -50%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
  animation: popIn .2s ease both;
}
body.result-dialog-open { overflow: hidden; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, -48%) scale(.98); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.issue-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.issue {
  display: flex; gap: 9px; align-items: flex-start; background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(0, 0, 0, .05); border-radius: 10px; padding: 9px 11px;
  font-size: 12.8px; color: #475467;
}
.issue .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto; }
.issue-error .dot { background: var(--red); }
.issue-warning .dot { background: var(--amber); }
.issue-info .dot { background: var(--green); }
.issue strong { color: var(--ink); font-weight: 800; }

.details-block { margin-top: 14px; border-top: 1px dashed rgba(0, 0, 0, .12); padding-top: 12px; }
.details-block summary { cursor: pointer; font-size: 13px; font-weight: 800; color: #344054; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; margin-top: 10px; }
.field-item { min-width: 0; }
.field-item .k { font-size: 11px; color: var(--muted); }
.field-item .v { font-size: 13px; font-weight: 700; word-break: break-word; }
.field-item.full { grid-column: 1 / -1; }
.field-item .v.pre { white-space: pre-wrap; font-weight: 500; max-height: 180px; overflow: auto; background: rgba(255,255,255,.6); border-radius: 8px; padding: 8px 10px; }

.roster-box { margin-top: 14px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.roster-box h4 { font-family: var(--sans); font-size: 14px; margin-bottom: 4px; }
.roster-box p { font-size: 12.5px; color: var(--muted); }
.roster-drop { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-top: 10px; }

.notice { border-radius: 14px; padding: 16px 18px; border: 1px solid var(--line); background: #fff; }
.notice.warn { background: #fffaf0; border-color: #f0d38b; }
.notice h4 { font-family: var(--sans); margin-bottom: 6px; font-size: 14px; }
.notice ul { margin: 0; padding-left: 18px; color: #475467; font-size: 13px; }
.notice li + li { margin-top: 4px; }

.section { padding: 44px 0; }
.section-head { max-width: 720px; margin-bottom: 24px; }
.section-head h2 { font-size: 30px; margin-bottom: 8px; }
.section-head p { color: var(--muted); margin-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 20px;
  position: relative; overflow: hidden;
}
.step .num { font-family: var(--serif); font-size: 34px; color: #cfe4d7; font-weight: 800; line-height: 1; margin-bottom: 12px; }
.step h3 { font-family: var(--sans); font-size: 15px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 12.8px; margin-bottom: 0; }
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 26px 0; margin-top: 20px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.footer-inner strong { color: #344054; }
.footer-inner a { color: inherit; text-decoration: none; }
.footer-inner a:hover { color: var(--green); text-decoration: underline; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #17202a; color: #fff; border-radius: 10px; padding: 10px 16px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 120;
  max-width: min(520px, calc(100% - 32px));
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--red); }

.applicant-login {
  min-height: calc(100vh - 70px); display: flex; align-items: center; padding: 48px 0 60px;
  background:
    radial-gradient(circle at 14% 18%, rgba(31, 122, 77, .10), transparent 34%),
    radial-gradient(circle at 86% 82%, rgba(72, 169, 120, .12), transparent 36%),
    #f5f8f5;
}
.applicant-card {
  width: min(520px, 100%); margin: 0 auto; background: #fff; border: 1px solid var(--line);
  border-radius: 22px; padding: 30px; box-shadow: var(--shadow);
}
.applicant-card h1 { font-size: 28px; margin-bottom: 8px; letter-spacing: .02em; }
.applicant-lead { color: #475467; font-size: 13.5px; line-height: 1.7; margin-bottom: 20px; }
.applicant-tip { margin-top: 14px; line-height: 1.6; }
.applicant-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--brand-3); border-radius: 10px; padding: 8px 12px; margin-bottom: 13px;
  color: #344054; font-size: 12.5px;
}
.applicant-strip strong { color: var(--brand); }
.applicant-strip .muted { margin-left: 8px; }
.applicant-who { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.applicant-who .muted { margin-left: 0; }
.applicant-strip-actions { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
#applicantLogout {
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
  background: #fff; color: var(--muted); font-size: 11.5px;
}
#applicantLogout:hover { border-color: var(--red); color: var(--red); text-decoration: none; }
.admin-badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: 999px; background: var(--brand); color: #fff;
  font-size: 10.5px; font-weight: 800; letter-spacing: .05em; white-space: nowrap;
}
.admin-entry-btn { color: var(--brand); font-weight: 800; }
.admin-auth-backdrop {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(18, 45, 31, .58);
}
.admin-auth-card {
  position: relative; width: min(420px, 100%); padding: 26px;
  background: #fff; border-radius: 18px; box-shadow: 0 28px 80px rgba(0,0,0,.28);
  animation: rise .25s ease both;
}
.admin-auth-close {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: 50%; background: #fff;
  color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.admin-auth-card h2 { font-family: var(--sans); font-size: 24px; margin-bottom: 7px; }
.admin-auth-card > p { font-size: 12.5px; line-height: 1.7; margin-bottom: 16px; }
.admin-auth-card .field { margin-bottom: 14px; }
.admin-auth-tip { text-align: center; margin-top: 10px; line-height: 1.5; }
.records-section { background: #fff; border-top: 1px solid var(--line); }
.record-list { display: grid; gap: 9px; }
.record-list { min-width: 0; }
.record-item {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; min-width: 0; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: #fff;
}
.record-item .record-main { min-width: 0; flex: 1 1 auto; }
.record-item .record-title { font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-item .record-meta { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.record-item .record-side { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.record-item a { color: var(--brand-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.record-empty { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; }

/* ---------- admin ---------- */
.login-screen {
  min-height: 100vh; display: grid; place-items: center; padding: 28px;
  background:
    radial-gradient(circle at 18% 20%, rgba(72, 169, 120, .25), transparent 34%),
    radial-gradient(circle at 88% 80%, rgba(31, 122, 77, .18), transparent 36%),
    linear-gradient(145deg, #0c3523, #104a30 55%, #0b2d1f);
}
.login-card {
  width: min(500px, calc(100vw - 56px)); background: #fff; border-radius: 22px; padding: 34px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .34); animation: rise .45s ease both;
}
.login-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 24px; white-space: nowrap; }
.login-brand .brand-name { font-size: 15px; }
.login-brand .brand-sub { font-size: 11px; letter-spacing: .04em; }
.login-card h1 { font-size: 26px; margin-bottom: 6px; letter-spacing: .02em; }
.login-card .login-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.login-error { background: var(--red-soft); color: #8e241a; border: 1px solid #f3b9b2; border-radius: 9px; padding: 9px 11px; font-size: 12.5px; margin-bottom: 14px; }
.remember-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 16px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.remember-row input { width: 16px; height: 16px; accent-color: var(--brand); flex: 0 0 auto; }
.login-tip { margin-top: 16px; font-size: 11.5px; color: var(--muted); text-align: center; }
.login-icp { margin-top: 7px; font-size: 11px; color: var(--muted); text-align: center; }
.login-icp a { color: inherit; text-decoration: none; }
.login-icp a:hover { color: var(--green); text-decoration: underline; }

.admin-body { background: #f2f5f2; }
.admin-shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: #0d3d27; color: #d9eee2; padding: 22px 14px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { color: #fff; padding: 4px 8px 20px; }
.sidebar .brand-sub { color: #91bfa4; }
.sidebar .brand-seal { background: radial-gradient(circle at 32% 26%, #4caf82, #1f7a4d 70%); }
.nav { display: grid; gap: 5px; }
.nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 0; background: transparent; color: #c9e3d4; border-radius: 10px;
  padding: 10px 12px; font-size: 13.5px; font-weight: 700;
}
.nav button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav button.active { background: #fff; color: #0d3d27; }
.nav svg { width: 17px; height: 17px; }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 11.5px; color: #91bfa4; }
.sidebar-foot strong { color: #fff; display: block; font-size: 13px; }
.sidebar-foot button { margin-top: 8px; border: 0; background: transparent; color: #ffd7d1; padding: 0; font-size: 12px; }

.admin-main { min-width: 0; padding: 24px 28px 44px; }
.inapp-banner {
  margin-bottom: 14px; padding: 10px 13px; border: 1px solid #f0d38b;
  border-radius: 10px; background: #fff8e8; color: #7a4b00;
  font-size: 12px; line-height: 1.65;
}
.inapp-banner strong { font-weight: 800; }
.file-inapp-hint {
  margin: 6px 0 2px; padding: 8px 10px; border-radius: 8px;
  background: #fff8e8; border: 1px solid #f0d38b;
  color: #7a4b00; font-size: 11px; line-height: 1.6;
}
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.topbar h1 { font-family: var(--sans); font-size: 23px; margin-bottom: 4px; }
.topbar .sub { color: var(--muted); font-size: 12.5px; }
.topbar-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.user-chip { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 6px; font-size: 12.5px; font-weight: 700; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-3); color: var(--brand); display: grid; place-items: center; font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; }
.stat .k { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.stat .v { display: block; font-size: 25px; font-weight: 800; line-height: 1.2; font-family: var(--serif); }
.stat-btn {
  position: relative; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  transition: .18s ease; -webkit-tap-highlight-color: transparent;
}
.stat-btn::after {
  content: "›"; position: absolute; right: 12px; top: 10px;
  color: #9bb8a8; font-size: 17px; line-height: 1; font-family: var(--sans);
}
.stat-btn:hover { border-color: #b7d5c2; box-shadow: 0 8px 22px rgba(18, 78, 48, .08); transform: translateY(-1px); }
.stat-btn:active { transform: translateY(0); }
.date-strip-panel {
  display: flex; align-items: center; gap: 8px; margin: -4px 0 18px;
  min-width: 0; padding: 7px 9px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px;
}
.date-strip {
  display: flex; align-items: center; gap: 7px; flex: 1 1 auto; min-width: 0;
  overflow-x: auto; padding: 3px 1px 5px; scrollbar-width: thin;
  scrollbar-color: #c6d9cc transparent; -webkit-overflow-scrolling: touch;
}
.date-strip::-webkit-scrollbar { height: 4px; }
.date-strip::-webkit-scrollbar-thumb { background: #c6d9cc; border-radius: 4px; }
.date-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: #475467;
  border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: .16s ease;
}
.date-chip:hover { border-color: #a9cbb7; color: var(--brand); }
.date-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.date-chip .count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #eef6f0; color: var(--brand); font-size: 10.5px; font-weight: 800;
}
.date-chip.active .count { background: rgba(255,255,255,.2); color: #fff; }
.date-chip .today-tag {
  font-size: 9px; font-weight: 800; letter-spacing: .06em; opacity: .78;
}
.date-all {
  flex: 0 0 auto; border: 1px solid var(--line); background: #fff;
  color: var(--muted); border-radius: 999px; padding: 7px 9px;
  font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.date-all:hover { color: var(--brand); background: #eef6f0; }
.date-all.active { color: var(--brand); background: #eef6f0; border-color: #b7d5c2; }
.date-strip-loading { color: var(--muted); font-size: 12px; padding: 8px 2px; }
.stat-btn:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.stat .v.red { color: var(--red); }
.stat .v.amber { color: var(--amber); }
.stat .v.green { color: var(--green); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.panel-head { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; }
.panel-head h2 { font-family: var(--sans); font-size: 15.5px; margin: 0; }
.panel-body { padding: 16px 18px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .input, .filters .select { min-height: 36px; padding: 7px 10px; font-size: 12.5px; border-radius: 9px; width: auto; }
.filters .search { min-width: 190px; flex: 1; max-width: 280px; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; min-width: 880px; }
.table th, .table td { text-align: left; padding: 11px 13px; border-bottom: 1px solid #edf0ed; font-size: 12.5px; vertical-align: middle; }
.table th { background: #f8faf8; color: #667085; font-size: 11px; letter-spacing: .03em; font-weight: 800; white-space: nowrap; }
.table tr { cursor: pointer; }
.table tbody tr:hover { background: #f6fbf7; }
.table td .title { font-weight: 800; color: #17202a; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table td .sub { color: var(--muted); font-size: 11px; margin-top: 1px; }
.table .actions { white-space: nowrap; text-align: right; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pager-btns { display: flex; gap: 7px; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); font-size: 13px; }

.reject-backdrop {
  position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(9, 24, 16, .58);
}
.reject-card {
  width: min(470px, 100%); padding: 24px; background: #fff; border-radius: 16px;
  box-shadow: 0 26px 70px rgba(0,0,0,.26); animation: rise .22s ease both;
}
.reject-card h3 { font-family: var(--sans); font-size: 20px; margin-bottom: 6px; }
.reject-card > p { font-size: 12.5px; line-height: 1.65; margin-bottom: 14px; }
.reject-card .textarea { width: 100%; min-height: 130px; resize: vertical; }
.reject-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(9, 24, 16, .45); z-index: 60; display: flex; justify-content: flex-end; }
.drawer {
  width: min(760px, 100%); height: 100%; background: #f7f9f7; overflow-y: auto;
  box-shadow: -20px 0 60px rgba(0, 0, 0, .18); animation: slide .25s ease both;
}
@keyframes slide { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-head { position: sticky; top: 0; z-index: 2; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 16px 22px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.drawer-head h2 { font-family: var(--sans); font-size: 17px; margin-bottom: 3px; }
.drawer-body { padding: 18px 22px 34px; }
.drawer-section { margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 15px 16px; }
.drawer-section h3 { font-family: var(--sans); font-size: 13.5px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.field-editor { background: #f7faf7; border: 1px solid var(--line); border-radius: 11px; padding: 12px; margin: 2px 0 13px; }
.field-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.field-editor .field-item { display: flex; flex-direction: column; gap: 4px; }
.field-editor .field-item .k { font-size: 11px; color: var(--muted); }
.field-editor .field-item.full { grid-column: 1 / -1; }
.field-editor .input, .field-editor .textarea { font-size: 13px; padding: 8px 10px; }
.field-editor .textarea { min-height: 105px; }
.field-editor-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.kv { display: grid; grid-template-columns: 118px 1fr; gap: 7px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; word-break: break-word; }
.kv dd.pre { white-space: pre-wrap; font-weight: 500; background: #f8faf8; border-radius: 8px; padding: 8px 10px; max-height: 220px; overflow: auto; }
.issue-admin { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px dashed #edf0ed; font-size: 12.5px; }
.issue-admin:last-child { border-bottom: 0; }
.issue-admin .sev { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; }
.sev-error { background: var(--red); }
.sev-warning { background: var(--amber); }
.sev-info { background: var(--green); }
.issue-admin strong { display: block; font-size: 12.5px; }
.issue-admin span { color: var(--muted); }
.file-preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fbfcfb; margin-top: 8px; }
.file-preview img { display: block; width: 100%; max-height: 430px; object-fit: contain; background: #eef1ee; }
.file-preview iframe { display: block; width: 100%; height: 430px; border: 0; }
.file-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.review-pass { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; margin-bottom: 7px; font-size: 12px; }
.review-pass .pass-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.review-pass .pass-head strong { font-size: 12.5px; }
.review-pass .pass-fields { color: var(--muted); display: grid; gap: 2px; }
.decision-bar { position: sticky; bottom: 0; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); padding: 12px 22px; display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; }
.decision-note { flex: 1; min-width: 180px; min-height: 42px; height: 42px; }
.audit-list { font-size: 11.5px; color: var(--muted); display: grid; gap: 6px; }
.audit-list div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed #edf0ed; padding-bottom: 5px; }

.export-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px; }
.export-form { display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end; }
.export-form .field { margin: 0; min-width: 180px; }
.admin-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.admin-form .field { margin: 0; }
.admin-form .btn { min-height: 42px; }
.archive-run { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-top: 14px; }
.archive-run .field { margin: 0; min-width: 200px; }
.export-result { margin-top: 12px; }
.smtp-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.email-setting { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.email-setting > label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.email-setting-form { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.email-setting-form .input { flex: 1; min-width: 0; }
.email-setting-result { margin-top: 8px; font-size: 12px; color: var(--green); }
.email-setting-result.error { color: var(--red); }
.export-list { display: grid; gap: 8px; }
.export-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.export-item .name { font-weight: 800; }
.export-item .meta { color: var(--muted); font-size: 11px; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px; min-width: 0; overflow: hidden; }
  .sidebar .brand { padding-bottom: 10px; }
  .nav { width: 100%; max-width: 100%; min-width: 0; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .sidebar-foot { display: none; }
  .admin-main { padding: 18px 16px 36px; min-width: 0; }
  .export-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 26px); }
  .applicant-login { min-height: calc(100vh - 94px); padding: 28px 0 36px; }
  .applicant-card { padding: 24px 20px; border-radius: 18px; }
  .applicant-card h1 { font-size: 24px; }
  .applicant-lead { font-size: 13px; }
  .applicant-strip { align-items: flex-start; flex-wrap: wrap; }
  .applicant-strip-actions { margin-left: auto; }
  .admin-auth-card { padding: 22px 18px; }
  .reject-card { padding: 20px 16px; }
  .record-item { align-items: flex-start; padding: 12px; }
  .record-item .record-side { flex-direction: column; align-items: flex-end; gap: 4px; }
  .header-inner { height: auto; padding: 9px 0 0; flex-wrap: wrap; gap: 0; }
  .brand { gap: 9px; min-width: 0; width: 100%; }
  .brand-seal { width: 36px; height: 36px; font-size: 11px; flex: 0 0 auto; }
  .brand-logo { width: 36px; height: 36px; }
  .brand-name { font-size: 13.5px; line-height: 1.3; }
  .brand-sub { font-size: 9.5px; letter-spacing: .03em; }
  .header-links {
    display: flex; width: 100%; justify-content: flex-end; gap: 8px;
    margin-top: 7px; padding: 7px 0 8px; border-top: 1px solid rgba(15, 81, 50, .10);
    font-size: 12px;
  }
  .header-links a { padding: 5px 12px; border-radius: 999px; background: var(--brand-3); color: var(--brand); font-weight: 700; }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: 31px; line-height: 1.2; margin-bottom: 14px; }
  .hero-lead { font-size: 14px; margin-bottom: 18px; }
  .hero-points { gap: 8px 14px; margin-bottom: 18px; font-size: 12.5px; }
  .hero-note { padding: 11px 12px; font-size: 12px; gap: 9px; }
  .upload-card { padding: 18px; border-radius: 18px; }
  .upload-card h2 { font-size: 22px; }
  .upload-card .sub { font-size: 12px; }
  .upload-zone { padding: 26px 12px; }
  .upload-zone h3 { font-size: 16px; }
  .upload-zone p { font-size: 11.5px; line-height: 1.6; }
  .format-grid { gap: 6px; }
  .format-card { padding: 10px 4px; }
  .format-card strong { font-size: 12.5px; }
  .format-card small { font-size: 10px; }
  .upload-foot { flex-wrap: wrap; gap: 7px 12px; align-items: flex-start; font-size: 11.5px; }
  .upload-foot > span { flex: 1 1 100%; }
  .upload-foot .link-btn { margin-left: auto; }
  .section { padding: 32px 0; }
  .section-head { margin-bottom: 18px; }
  .section-head h2 { font-size: 26px; }
  .steps { grid-template-columns: 1fr; gap: 10px; }
  .step { padding: 16px; }
  .footer-inner { gap: 14px; font-size: 11.5px; }
  #steps { scroll-margin-top: 110px; }
  .result.result-popup { width: calc(100% - 20px); max-height: 88vh; padding: 16px; }
  .field-grid, .field-editor-grid { grid-template-columns: 1fr; }
  .email-setting-form { flex-direction: column; align-items: stretch; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .date-strip-panel { gap: 6px; margin-bottom: 13px; }
  .date-chip { padding: 6px 9px; font-size: 11px; }
  .date-all { padding: 6px 4px; font-size: 10.5px; }
  .stat { padding: 11px 10px; }
  .stat .k { font-size: 10.5px; }
  .stat .v { font-size: 21px; }
  .topbar { flex-direction: column; gap: 10px; }
  .topbar h1 { font-size: 20px; }
  .topbar-actions { width: 100%; justify-content: space-between; gap: 7px; }
  .admin-main { padding: 14px 13px 30px; }
  .sidebar { padding: 12px 13px; }
  .sidebar .brand { padding: 0 0 9px; gap: 9px; }
  .sidebar .brand-seal { width: 36px; height: 36px; font-size: 11px; }
  .sidebar .brand-logo { width: 36px; height: 36px; }
  .sidebar .brand-name { font-size: 14px; }
  .sidebar .brand-sub { font-size: 9.5px; }
  .nav { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 1px; }
  .nav button, .nav .nav-link { width: auto; flex: 0 0 auto; padding: 7px 9px; font-size: 11.5px; gap: 6px; white-space: nowrap; }
  .nav svg { width: 15px; height: 15px; }
  .panel-head { padding: 12px 13px; }
  .panel-body { padding: 12px 13px; }
  .filters { gap: 7px; }
  .filters .search { flex: 1 1 100%; max-width: none; min-width: 0; }
  .filters .select, .filters .input { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .filters .search.input { flex: 1 1 100%; max-width: none; }
  .filters .btn { flex: 0 0 auto; }
  .admin-form { grid-template-columns: 1fr; }
  .admin-form .btn { width: 100%; }
  .kv { grid-template-columns: 88px minmax(0, 1fr); }
  .drawer-body { padding: 12px; }
  .drawer-head, .decision-bar { padding-left: 12px; padding-right: 12px; }
  .decision-bar { align-items: stretch; }
  .decision-note { flex: 1 1 100%; min-width: 0; height: 58px; }
  .decision-bar .btn { flex: 1 1 calc(50% - 5px); }
  .login-screen { padding: 20px 14px; }
  .login-card { padding: 24px 20px; }
  .login-card h1 { font-size: 22px; line-height: 1.35; }
  .login-brand .brand-name { font-size: 11px; }
  .login-brand .brand-sub { font-size: 8px; letter-spacing: .02em; }
  .login-sub { font-size: 12px; }
  .table-wrap { overflow: visible; padding: 0 12px 12px; }
  table.table { width: 100%; min-width: 0; }
  table.table thead { display: none; }
  table.table tbody { display: block; }
  table.table tr { display: block; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 9px; padding: 11px 12px; background: #fff; }
  table.table td { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border: 0; padding: 4px 0; font-size: 12px; white-space: normal; }
  table.table td.nowrap { white-space: normal; }
  table.table td.cell-main { display: block; padding: 0 0 8px; margin-bottom: 5px; border-bottom: 1px dashed #edf0ed; }
  table.table td.cell-main .title { max-width: none; white-space: normal; font-size: 14px; line-height: 1.45; }
  table.table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 700; flex: 0 0 auto; }
  table.table td.actions { display: block; padding-top: 8px; white-space: normal; }
  table.table td.actions .btn { display: block; width: 100%; margin-top: 6px; }
  table.table td[colspan] { display: block; border: 0; padding: 0; }
  .pager { padding: 10px 12px; }
  .pager-btns { gap: 5px; }
  .table td .sub { font-size: 10.5px; }
}
@media (max-width: 380px) {
  .login-brand { white-space: normal; align-items: flex-start; }
}
