:root {
  color-scheme: light;
  --ink: #172c24;
  --muted: #53635b;
  --green: #24513e;
  --green-hover: #173c2c;
  --line: #dce2d8;
  --page: #f4f5f0;
  --paper: #fff;
  --soft: #edf1e8;
  --error: #8d2921;
  --shadow: 0 10px 32px #2d47330a;
  --sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.58 var(--sans); }
button, textarea, input { font: inherit; }
button { cursor: pointer; }
button[disabled] { cursor: default; opacity: .58; }
:focus-visible { outline: 3px solid #548865; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.22; }
ul, ol, dl, dd { margin: 0; padding: 0; }
a { color: var(--green); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; inset: 8px auto auto 8px; z-index: 4; padding: 10px; background: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header { background: #fffffd; border-bottom: 1px solid var(--line); }
.site-header-inner { width: min(calc(100% - 48px), 1360px); margin: auto; min-height: 74px; display: flex; align-items: center; gap: 19px; }
.brand { position: relative; flex: 0 0 auto; width: 149px; }
.brand img { display: block; width: 100%; height: auto; filter: brightness(0) saturate(100%) invert(19%) sepia(24%) saturate(971%) hue-rotate(103deg) brightness(91%) contrast(95%); }
@supports (mask-image: url(/academy-lockup.png)) or (-webkit-mask-image: url(/academy-lockup.png)) {
  .brand img { opacity: 0; }
  .brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg,#347d41 0 4.5%,transparent 4.5%),linear-gradient(90deg,#347d41 0 29%,#203b2a 29%);
    -webkit-mask: url(/academy-lockup.png) center / contain no-repeat;
    mask: url(/academy-lockup.png) center / contain no-repeat;
  }
}
.header-title { border-left: 1px solid var(--line); padding-left: 17px; font-size: 14px; font-weight: 660; white-space: nowrap; }
.account { margin-left: auto; display: flex; align-items: center; gap: 15px; min-width: 0; }
#account-name { color: var(--muted); max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.button { min-height: 40px; padding: 8px 15px; border: 1px solid transparent; border-radius: 6px; font-weight: 650; white-space: nowrap; }
.secondary { background: var(--paper); border-color: #cbd6cb; color: var(--green); }
.secondary:hover:not(:disabled) { background: var(--soft); border-color: #9caf9f; }
.primary { background: var(--green); color: #fff; }
.primary:hover:not(:disabled) { background: var(--green-hover); }
.text-button { border: 0; border-radius: 4px; background: none; color: var(--green); padding: 7px; font-weight: 600; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }

.auth-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  width: min(calc(100% - 48px), 1000px);
  margin: clamp(30px, 9vh, 110px) auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.auth-intro {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(42px, 6vw, 86px) clamp(28px, 5vw, 72px);
  background:
    radial-gradient(ellipse at 96% 110%, #b2c5ac, #dce7d5 30%, transparent 56%),
    linear-gradient(145deg, #edf2e6, #e4ebdd 60%, #d1ddcd);
}
.auth-intro::before, .auth-intro::after {
  content: "";
  position: absolute;
  inset: auto -30% -68% auto;
  width: min(116%, 590px);
  aspect-ratio: 1;
  border-radius: 45%;
  border: 1px solid #59836468;
  transform: rotate(-24deg);
  box-shadow: 0 0 0 13px #ffffff42, 0 0 0 30px #527f5c22, 0 0 0 47px #ffffff3b, 0 0 0 65px #527f5c25;
}
.auth-intro::after { transform: rotate(17deg); inset: auto -38% -73% auto; border-color: #fff9; box-shadow: none; }
.auth-copy { position: relative; z-index: 1; }
.eyebrow { color: var(--green); font-size: 13px; letter-spacing: .06em; font-weight: 680; }
.auth-copy h1 { font-size: clamp(39px, 5.4vw, 70px); letter-spacing: -.055em; margin: 14px 0 15px; }
.auth-copy > p:last-child { max-width: 24em; font-size: clamp(15px, 1.6vw, 18px); color: #40564a; }
.auth-card { display: flex; align-items: center; padding: clamp(27px, 5.5vw, 73px); }
.auth-card form { width: 100%; }
.auth-card h2 { font-size: 26px; font-weight: 720; letter-spacing: -.035em; margin-bottom: 9px; }
.auth-card form > .muted { margin-bottom: 23px; font-size: 14px; }
.field { display: grid; gap: 7px; }
.field + .field { margin-top: 15px; }
.field label { font-weight: 650; }
input:not([type=checkbox]):not([type=radio]), textarea {
  display: block;
  min-width: 0;
  width: 100%;
  color: var(--ink);
  border: 1px solid #bbcabc;
  border-radius: 6px;
  background: #fff;
  padding: 9px 11px;
}
input:not([type=checkbox]):not([type=radio]) { min-height: 43px; }
input::placeholder { color: #687970; }
.auth-button { display: block; width: 100%; min-height: 45px; margin-top: 20px; }
#back-login { margin: 8px auto 0; display: block; }
.status-error { color: var(--error); font-size: 14px; margin-top: 10px; }

.workspace { width: min(calc(100% - 48px), 1360px); margin: 35px auto 50px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 13px; margin: 0 0 23px; }
.page-head h1 { font-size: clamp(29px, 3vw, 42px); font-weight: 730; letter-spacing: -.043em; }
.page-head p { color: var(--muted); margin-top: 5px; }
.inline-notice { margin: 0 0 16px; border: 1px solid #c4d7c2; color: var(--green); background: #e9f2e6; border-radius: 6px; padding: 10px 13px; }
.inline-notice[data-error="true"] { color: var(--error); background: #fff1ee; border-color: #eed1ca; }
.review-grid { display: grid; grid-template-columns: minmax(355px, 1fr) minmax(0, 1.58fr); gap: 20px; align-items: start; }
.surface { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); min-width: 0; }
.list-head { padding: 19px 20px 15px; border-bottom: 1px solid var(--line); }
.list-head h2 { font-size: 19px; margin-bottom: 12px; }
.search { display: flex; gap: 7px; align-items: center; }
.search input { flex: 1 1 120px; }
.search .secondary { min-height: 43px; }
.status-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.status-filter button { padding: 5px 8px; color: var(--muted); background: #f7f8f4; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; min-height: 32px; }
.status-filter button:hover { border-color: #9fb2a3; }
.status-filter button[aria-pressed=true] { background: #e6efe3; color: var(--green); border-color: #b4c8b6; font-weight: 700; }
.status-filter span { font-variant-numeric: tabular-nums; }
.list-status { padding: 23px 20px; color: var(--muted); }
.applications { list-style: none; }
@media (min-width: 811px) { .applications { max-height: min(64vh, 680px); overflow-y: auto; } }
.application-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 5px 12px;
  text-align: left;
  background: var(--paper);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  color: var(--ink);
  padding: 15px 19px 14px 16px;
}
.application-row:hover { background: #f7f9f4; }
.application-row[aria-current="true"] { background: #edf3ea; border-left-color: var(--green); }
.application-row:focus-visible { outline-offset: -3px; }
.application-row strong { font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.row-identifiers, .row-course { grid-column: 1 / -1; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.row-identifiers { font-variant-numeric: tabular-nums; }
.badge { border-radius: 4px; border: 1px solid #d4dcd2; background: #f4f7f3; color: #405b4a; padding: 1px 7px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge[data-status=pending] { color: #684f16; background: #fbf5e3; border-color: #ece0b5; }
.badge[data-status=approved] { color: #20533a; background: #e4f2e4; border-color: #c7e1c8; }
.badge[data-status=needs_info] { color: #305669; background: #edf6f8; border-color: #cbdfe7; }
.badge[data-status=rejected] { color: #7b322b; background: #faf0eb; border-color: #ead4cc; }
.pagination { padding: 14px 19px; display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 11px; }
.pagination div { display: flex; gap: 6px; }
.pagination .button { min-height: 33px; padding: 5px 8px; font-size: 12px; }
.detail-panel { min-height: 395px; }
.empty-detail { text-align: center; padding: 80px 26px 65px; }
.empty-detail h2 { margin: 18px 0 6px; font-size: 21px; }
.empty-icon { position: relative; margin: 0 auto; width: 50px; height: 38px; border: 1px solid #b4c5b1; border-radius: 7px; background: #e6eee2; }
.empty-icon::before { content: ""; position: absolute; top: -6px; left: 4px; width: 18px; height: 7px; border: 1px solid #b4c5b1; border-bottom: 0; border-radius: 4px 4px 0 0; background: #e6eee2; }
.mobile-back { display: none; }
.application-detail { padding: clamp(18px, 2.5vw, 30px); }
.detail-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.detail-heading h2 { font-size: 26px; overflow-wrap: anywhere; }
.detail-heading p { font-size: 13px; margin-top: 6px; overflow-wrap: anywhere; }
.detail-section { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 22px; }
.detail-section h3 { font-size: 17px; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 19px; margin: 14px 0 0; }
.facts > div { min-width: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { font-weight: 630; overflow-wrap: anywhere; margin-top: 3px; }
.facts .wide { grid-column: 1 / -1; }
.contact-details { padding: 11px 13px; border: 1px solid var(--line); border-radius: 6px; margin-top: 15px; }
.contact-details summary { color: var(--green); font-weight: 650; cursor: pointer; }
.file-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.file-button { display: flex; min-width: 0; gap: 8px; justify-content: space-between; align-items: center; color: var(--ink); background: #f7f9f4; border: 1px solid var(--line); border-radius: 6px; padding: 10px 11px; text-align: left; }
.file-button:hover { border-color: #9aaa96; background: var(--soft); }
.file-button span:last-child { color: var(--green); font-size: 12px; white-space: nowrap; }
.file-button span:first-child { overflow-wrap: anywhere; }
.payment-check, .decision-options label { display: flex; align-items: center; gap: 8px; }
input[type=checkbox], input[type=radio] { accent-color: var(--green); flex: 0 0 auto; width: 17px; height: 17px; margin: 0; }
.payment-check { margin: 13px 0 5px; }
.decision-options { display: flex; flex-wrap: wrap; gap: 7px; border: 0; padding: 0; margin: 15px 0; }
.decision-options legend { margin: 0 0 6px; font-weight: 650; }
.decision-options label { border: 1px solid #cbd6cb; border-radius: 6px; padding: 8px 10px; }
.decision-options label:has(:checked) { border-color: #82a286; background: var(--soft); }
textarea { min-height: 88px; resize: vertical; }
.decision-help { font-size: 13px; margin: 5px 0 0; }
.decision-form .primary { margin-top: 13px; }
.history { margin-top: 8px; list-style: none; padding-left: 12px; }
.history li { border-left: 1px solid #c5d3c2; padding: 10px 0 10px 15px; position: relative; }
.history li::before { position: absolute; left: -4px; top: 18px; content: ""; border-radius: 50%; width: 7px; height: 7px; background: #618667; }
.history p { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.history .history-meta { color: var(--muted); font-size: 13px; }
.preview-dialog { border: 1px solid var(--line); padding: 0; border-radius: 9px; background: var(--paper); color: var(--ink); width: min(820px, calc(100% - 30px)); max-width: none; max-height: calc(100dvh - 38px); }
.preview-dialog::backdrop { background: #172a22ad; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 10px; }
.dialog-head h2 { font-size: 18px; }
.preview-content { display: grid; place-items: center; min-height: 160px; padding: 13px; background: #eef1ea; }
.preview-content img { display: block; max-width: 100%; max-height: calc(100dvh - 133px); object-fit: contain; }

@media(max-width: 810px) {
  .review-grid { grid-template-columns: 1fr; }
  .review-grid[data-selected=false] .detail-panel { display: none; }
  .review-grid[data-selected=true] .list-panel { display: none; }
  .review-grid[data-selected=true] .mobile-back { display: inline-block; margin: 15px 17px 0; }
  .detail-panel { min-height: 0; }
}
@media(max-width: 640px) {
  .page-head { flex-wrap: wrap; }
  .auth-layout { grid-template-columns: 1fr; width: calc(100% - 30px); margin-block: 24px; }
  .auth-intro { padding: 25px 24px 28px; }
  .auth-copy h1 { margin-block: 7px 10px; }
  .auth-intro::before { inset: auto -24% -198px auto; width: 325px; }
  .auth-intro::after { inset: auto -26% -215px auto; width: 325px; }
  .auth-card { padding: 24px; }
  .site-header-inner, .workspace { width: calc(100% - 30px); }
  .site-header-inner { gap: 10px; min-height: 62px; }
  .brand { width: 114px; }
  .header-title { font-size: 13px; padding-left: 10px; }
  .account { gap: 6px; }
  #account-name { display: none; }
  .logout-button { min-height: 35px; padding: 4px 8px; font-size: 12px; }
  .workspace { margin-top: 22px; }
  .page-head { align-items: start; }
  .page-head p { font-size: 13px; }
  .page-head .button { min-height: 36px; font-size: 12px; padding: 7px 9px; }
  .list-head { padding: 15px 13px 12px; }
  .application-row { padding-inline: 12px 14px; }
}
@media(max-width: 370px) {
  .file-grid, .facts { grid-template-columns: minmax(0, 1fr); }
  .status-filter { gap: 4px; }
  .status-filter button { padding-inline: 6px; }
}
.sms-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.sms-field .button { padding-inline: 10px; font-size: 13px; }
.captcha-label { font-weight: 650; }
.captcha-field .button { min-height: 43px; white-space: normal; }
.captcha-field .button[data-passed="true"] { background: var(--soft); opacity: 1; }
.captcha-status { color: var(--muted); font-size: 13px; }
.captcha-status[data-failed="true"] { color: var(--error); }
.status-help { color: var(--muted); font-size: 14px; margin-top: 10px; }

.page-actions { display: flex; align-items: center; justify-content: end; gap: 8px; flex-wrap: wrap; }
.staff-dialog { border: 1px solid var(--line); padding: 0; border-radius: 9px; background: var(--paper); color: var(--ink); width: min(610px, calc(100% - 30px)); max-width: none; max-height: calc(100dvh - 38px); }
.staff-dialog::backdrop { background: #172a22ad; }
.staff-dialog .dialog-head { position: sticky; top: 0; z-index: 1; background: var(--paper); }
.staff-content { padding: 17px clamp(15px, 3vw, 24px) 23px; }
.staff-status { padding: 0; }
.staff-list { list-style: none; }
.staff-list li { display: flex; justify-content: space-between; align-items: start; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.staff-list strong { overflow-wrap: anywhere; }
.staff-list p { color: var(--muted); font-size: 13px; }
.staff-phone { font-variant-numeric: tabular-nums; white-space: nowrap; }
#staff-form { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 19px; }
.staff-list li:last-child { border-bottom: 0; }
#staff-form h3 { font-size: 17px; margin-bottom: 4px; }
.staff-copy { font-size: 14px; }
.staff-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 10px; margin: 13px 0; }
.staff-fields .field + .field { margin-top: 0; }
#staff-submit { margin-top: 9px; }
@media(max-width: 400px) { .staff-fields { grid-template-columns: 1fr; } }
