.match-page,
.admin-page,
.job-page,
.admin-job-page,
.login-page {
  min-height: 100vh;
  min-width: 0;
  background: #f4f7fb;
}

.match-header,
.admin-header,
.detail-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
}

.match-header-inner,
.admin-header-inner,
.detail-header > div {
  width: min(1180px, calc(100% - 36px));
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
}

.match-brand { min-width: 0; display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 40px; height: 40px; display: block; flex: 0 0 auto; object-fit: contain; }
.match-brand strong, .match-brand small { display: block; }
.match-brand strong { font-size: 15px; }
.match-brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.match-header-actions { display: flex; align-items: center; gap: 16px; }
.match-header-actions > a { min-height: 32px; display: grid; place-items: center; border: 1px solid #b8c8df; border-radius: 5px; padding: 0 10px; color: var(--green-dark); background: #fff; font-size: 10px; font-weight: 700; text-decoration: none; }
.match-header-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.match-header-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.login-page { display: grid; grid-template-rows: auto 1fr auto; }
.login-header { min-height: 68px; border-bottom: 1px solid var(--line); background: #fff; }
.login-header-inner { width: min(1040px, calc(100% - 36px)); min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 auto; }
.login-main { width: min(420px, calc(100% - 32px)); display: grid; place-items: center; margin: 0 auto; padding: 56px 0; }
.login-panel { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 30px; background: #fff; box-shadow: 0 12px 36px rgb(8 47 115 / 8%); }
.login-panel h1 { margin: 5px 0 24px; font-size: 23px; }
.login-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: -10px 0 20px; padding: 3px; background: #edf3fa; }
.login-mode button { min-height: 34px; border: 0; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; }
.login-mode button.active { color: var(--green-dark); background: #fff; box-shadow: 0 1px 4px rgb(25 40 32 / 10%); }
.login-form { display: grid; gap: 16px; }
.login-form label { display: grid; gap: 7px; }
.login-form label span { color: #435148; font-size: 11px; font-weight: 700; }
.login-form input { width: 100%; height: 44px; border: 1px solid #c7d2cc; border-radius: 5px; padding: 0 12px; color: var(--ink); background: #fff; outline: none; }
.login-submit { min-height: 44px; margin-top: 4px; border: 0; border-radius: 5px; color: #fff; background: var(--green); font-weight: 700; }
.login-submit:hover:not(:disabled) { background: var(--green-dark); }
.login-error { margin: -3px 0 0; border-left: 3px solid var(--red); padding: 8px 10px; color: #8d3329; background: #fff2ef; font-size: 11px; line-height: 1.5; }
.register-result { margin: -3px 0 0; border-left: 3px solid var(--green); padding: 8px 10px; color: var(--green-dark); background: #edf4ff; font-size: 11px; line-height: 1.5; }
.register-result.error { border-left-color: var(--red); color: #8d3329; background: #fff2ef; }
.login-footer { padding: 0 16px 24px; color: var(--muted); font-size: 10px; text-align: center; }
.login-footer a { color: inherit; text-decoration: none; }

.match-main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 130px; }
.match-intro { max-width: 660px; margin-bottom: 24px; }
.match-intro h1 { margin: 0; font-size: 28px; line-height: 1.25; }
.match-intro > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.match-workspace { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: 650px; border: 1px solid var(--line); background: #fff; }
.match-input-panel { padding: 24px; border-right: 1px solid var(--line); background: #fafcff; }
.match-results-panel { min-width: 0; padding: 24px; }
.match-page .empty-results { min-height: 490px; }
.match-page .job-card { box-shadow: 0 2px 10px rgb(24 45 35 / 4%); }
.site-legal { margin-top: 28px; color: var(--muted); font-size: 11px; text-align: center; }
.site-legal a { color: inherit; text-decoration: none; }
.site-legal a:hover { color: var(--green-dark); text-decoration: underline; }

.consult-fab {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 15;
  width: min(560px, calc(100% - 28px));
  min-height: 62px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
  border: 1px solid #0754bd;
  border-radius: 8px;
  padding: 8px 15px;
  color: #fff;
  background: #0969e8;
  box-shadow: 0 12px 32px rgb(9 105 232 / 24%);
  text-align: center;
}
.consult-fab small, .consult-fab strong { display: block; overflow-wrap: anywhere; }
.consult-fab small { margin-bottom: 3px; color: #dbeafe; font-size: 10px; }
.consult-fab strong { font-size: 14px; }
.consult-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--green-dark); background: #e5f0ff; font-size: 12px; font-weight: 800; }

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 76px);
  z-index: 14;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #b8c8df;
  border-radius: 50%;
  color: var(--green-dark);
  background: #fff;
  box-shadow: 0 8px 24px rgb(8 47 115 / 16%);
  font-size: 20px;
  line-height: 1;
}
.back-to-top:hover { border-color: var(--green); background: #f2f7ff; }
.back-to-top:focus-visible { outline: 3px solid rgb(9 105 232 / 20%); outline-offset: 2px; }

.consult-dialog { width: min(390px, calc(100% - 32px)); border: 0; border-radius: 8px; padding: 26px; color: var(--ink); background: #fff; box-shadow: 0 24px 70px rgb(15 32 24 / 28%); }
.consult-dialog::backdrop { background: rgb(11 24 18 / 55%); }
.consult-dialog h2 { margin: 0; font-size: 20px; }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; color: var(--muted); background: transparent; font-size: 23px; }
.dialog-copy { margin: 8px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.qr-placeholder, .consult-qr { width: 210px; height: 210px; margin: 0 auto 18px; border: 1px dashed #afbeb6; border-radius: 6px; }
.qr-placeholder { display: grid; place-items: center; color: var(--muted); background: #f4f7fb; font-size: 12px; }
.consult-qr { display: block; object-fit: contain; }
.wechat-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; background: #edf3fa; font-size: 11px; }
.wechat-row strong { overflow: hidden; text-overflow: ellipsis; }
.wechat-row button { min-height: 30px; border: 1px solid #a9beb3; border-radius: 5px; color: var(--green); background: #fff; }

.admin-shell {
  width: min(1360px, calc(100% - 36px));
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  margin: 0 auto;
}
.admin-sidebar {
  position: sticky;
  top: 88px;
  margin-top: 28px;
  border: 1px solid var(--line);
  background: #fff;
}
.admin-sidebar nav { display: grid; padding: 7px; }
.admin-sidebar button {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 4px;
  padding: 0 11px;
  color: #536159;
  background: transparent;
  font-size: 12px;
  text-align: left;
}
.admin-sidebar button:hover { color: var(--green-dark); background: #f2f6fc; }
.admin-sidebar button.active { border-left-color: var(--green); color: var(--green-dark); background: #e7f1ff; font-weight: 700; }
.admin-main { min-width: 0; width: auto; margin: 0; padding: 28px 0 70px; }
.admin-main > [data-admin-page="sources"],
.admin-main > [data-admin-page="settings"],
.admin-main > [data-admin-page="assessment"]:first-of-type,
.admin-main > [data-admin-page="jobs"],
.admin-main > [data-admin-page="history"],
.admin-main > [data-admin-page="accounts"] { margin-top: 0; }
.admin-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-title-row h1 { margin: 0; font-size: 24px; }
.open-match-link, .open-test-link, .back-link { color: var(--green-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.admin-header-actions { display: flex; align-items: center; gap: 14px; }
.logout-command { min-height: 32px; border: 1px solid #c5d0ca; border-radius: 5px; padding: 0 10px; color: #526159; background: #fff; font-size: 11px; white-space: nowrap; }
.logout-command:hover { color: var(--green-dark); border-color: #8eaa9b; }
.admin-page .admin-grid { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); }
.admin-page .admin-summary { grid-template-columns: repeat(5, 1fr); }
.admin-page .source-row { grid-template-columns: 38px minmax(0, 1fr) 58px auto auto; }
.source-info strong small { display: inline-block; margin-right: 7px; color: var(--green); font-size: 9px; }
.source-health.pending { color: var(--amber); }
.source-probe {
  min-width: 52px;
  min-height: 32px;
  border: 1px solid #b7c8bf;
  border-radius: 5px;
  padding: 0 9px;
  color: var(--green-dark);
  background: #fff;
  font-size: 10px;
  text-align: center;
}
.source-probe:hover:not(:disabled) { border-color: var(--green); background: #f1f6ff; }
.consultant-settings { margin-top: 16px; padding: 20px; }
.settings-note { color: var(--muted); font-size: 10px; }
.consultant-form { display: grid; grid-template-columns: 160px 180px minmax(220px, 1fr) minmax(220px, 1fr); align-items: end; gap: 12px; margin-top: 16px; }
.consultant-form label { display: grid; gap: 6px; }
.consultant-form label > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.consultant-form input { width: 100%; height: 40px; border: 1px solid #ccd6d1; border-radius: 5px; padding: 0 10px; }
.qr-upload { position: relative; min-height: 40px; }
.qr-upload input { position: absolute; opacity: 0; pointer-events: none; }
.qr-file-label { min-height: 40px; display: grid; place-items: center; border: 1px dashed #96afd2; border-radius: 5px; color: var(--green) !important; background: #f6f9fe; }
.qr-current { width: 44px; height: 44px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 8px; text-align: center; }
.qr-current img { width: 100%; height: 100%; object-fit: contain; }
.recommendation-settings { margin-top: 16px; padding: 20px; }
.recommendation-note { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.recommendation-create, .recommendation-row {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.4fr) auto;
  align-items: end;
  gap: 12px;
}
.recommendation-create { margin-top: 16px; border: 1px solid #d7e0db; padding: 16px; background: #f7f9f8; }
.recommendation-create label:not(.recommendation-switch), .recommendation-row label:not(.recommendation-switch) { display: grid; gap: 6px; }
.recommendation-create label > span, .recommendation-row label > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.recommendation-create input:not([type="checkbox"]), .recommendation-row input:not([type="checkbox"]),
.recommendation-create textarea, .recommendation-row textarea {
  width: 100%;
  border: 1px solid #ccd6d1;
  border-radius: 5px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 11px;
  resize: vertical;
}
.recommendation-create input:not([type="checkbox"]), .recommendation-row input:not([type="checkbox"]) { height: 40px; }
.recommendation-list { margin-top: 16px; border-top: 1px solid var(--line); }
.recommendation-row { grid-template-columns: 92px minmax(210px, .8fr) minmax(300px, 1.4fr) auto; padding: 14px 0; border-bottom: 1px solid var(--line); }
.recommendation-row-status { align-self: center; }
.recommendation-switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.recommendation-switch input { position: absolute; opacity: 0; pointer-events: none; }
.recommendation-switch i { width: 34px; height: 19px; position: relative; flex: 0 0 auto; border-radius: 10px; background: #b8c2bd; transition: background 150ms ease; }
.recommendation-switch i::after { content: ""; width: 15px; height: 15px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 18%); transition: transform 150ms ease; }
.recommendation-switch input:checked + i { background: var(--green); }
.recommendation-switch input:checked + i::after { transform: translateX(15px); }
.recommendation-switch input:focus-visible + i { outline: 3px solid rgb(9 105 232 / 18%); outline-offset: 2px; }
.recommendation-switch span { color: #58665e; font-size: 10px; font-weight: 700; white-space: nowrap; }
.recommendation-row-actions { display: flex; align-items: center; gap: 7px; }
.recommendation-delete { width: 34px; height: 34px; border: 1px solid #ddc5c1; border-radius: 5px; color: #9b4338; background: #fff; font-size: 18px; }
.recommendation-empty { padding: 22px 0; color: var(--muted); font-size: 10px; text-align: center; }
.admin-page .jobs-browser td:first-child { min-width: 250px; }
.curated-state { color: var(--amber); font-size: 10px; }
.curated-state.done { color: var(--green); }
.row-action { color: var(--green); font-weight: 700; white-space: nowrap; text-decoration: none; }
.assessment-leads { margin-top: 16px; border: 1px solid var(--line); padding: 20px; background: #fff; }
.lead-table-actions { display: flex; align-items: center; gap: 8px; }
.lead-table-actions select { height: 34px; border: 1px solid #c8d3cd; border-radius: 5px; padding: 0 28px 0 9px; color: #526159; background: #fff; font-size: 10px; }
.lead-table-actions a { min-height: 34px; display: grid; place-items: center; border-radius: 5px; padding: 0 11px; color: #fff; background: var(--blue); font-size: 10px; font-weight: 700; text-decoration: none; }
.assessment-leads td { vertical-align: middle; }
.assessment-leads td:nth-child(2) { min-width: 130px; }
.assessment-leads td:nth-child(3) { min-width: 120px; }
.assessment-leads td:nth-child(5) { min-width: 130px; }
.assessment-leads td:nth-child(6) { min-width: 130px; }
.lead-contact-value, .assessment-leads td small { display: block; }
.lead-contact-value { font-size: 11px; }
.assessment-leads td small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.lead-empty { color: var(--muted); font-size: 9px; }
.admission-tag { display: inline-block; padding: 4px 7px; border-radius: 4px; color: #79500f; background: #fff1d8; font-size: 9px; white-space: nowrap; }
.admission-tag.apply { color: var(--green-dark); background: #e7f1ff; }
.admission-tag.consult { color: #8d392f; background: #fdebe7; }

.temporary-password {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  border-left: 3px solid var(--amber);
  padding: 12px 14px;
  background: #fff7e8;
}
.temporary-password span, .temporary-password strong, .temporary-password small { display: block; }
.temporary-password span { color: #765317; font-size: 10px; font-weight: 700; }
.temporary-password strong { margin-top: 5px; font-size: 17px; letter-spacing: 0; }
.temporary-password small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.account-list { margin-top: 14px; border-top: 1px solid var(--line); }
.account-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 86px 100px auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}
.account-row strong, .account-row span, .account-row small { display: block; }
.account-row strong { font-size: 12px; }
.account-row span, .account-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.account-row time { color: #46544d; font-size: 10px; }
.account-status { justify-self: start; border-radius: 4px; padding: 4px 7px; color: #75500e; background: #fff0d5; font-size: 9px; }
.account-status.active { color: var(--green-dark); background: #e5f0ff; }
.account-status.rejected { color: #943d32; background: #fbe9e6; }
.account-actions { display: flex; justify-content: flex-end; gap: 7px; }
.account-actions button { min-height: 32px; }
.account-state { justify-self: end; }
.account-empty { padding: 28px 0; color: var(--muted); font-size: 11px; text-align: center; }

.password-dialog {
  width: min(420px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 70px rgb(15 32 24 / 28%);
}
.password-dialog::backdrop { background: rgb(11 24 18 / 55%); }
.password-dialog form { display: grid; gap: 14px; padding: 26px; }
.password-dialog h2 { margin: -7px 0 0; font-size: 21px; }
.password-dialog form > p:not(.eyebrow, .login-error) { margin: -4px 0 3px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.password-dialog label { display: grid; gap: 6px; }
.password-dialog label span { color: #435148; font-size: 10px; font-weight: 700; }
.password-dialog input { width: 100%; height: 42px; border: 1px solid #c7d2cc; border-radius: 5px; padding: 0 11px; }
.password-dialog .primary-command { margin-top: 3px; }

.detail-header > div { justify-content: flex-start; }
.detail-header .back-link { margin-right: auto; }
.job-detail-main { width: min(1080px, calc(100% - 36px)); margin: 0 auto; padding: 30px 0 130px; }
.job-detail-hero { padding: 28px; border: 1px solid var(--line); background: #fff; }
.job-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.job-detail-heading h1 { margin: 9px 0 6px; font-size: 28px; line-height: 1.3; }
.job-detail-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-badges span { padding: 4px 8px; border-radius: 4px; color: var(--green-dark); background: #e7f1ff; font-size: 10px; }
.detail-badges .third-party { color: #82540d; background: #fff1d8; }
.detail-score { min-width: 82px; text-align: center; }
.detail-score strong, .detail-score span { display: block; }
.detail-score strong { color: var(--green); font-size: 34px; }
.detail-score span { color: var(--muted); font-size: 10px; }
.detail-facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-facts div { padding-right: 20px; }
.detail-facts span, .detail-facts strong { display: block; }
.detail-facts span { color: var(--muted); font-size: 10px; }
.detail-facts strong { margin-top: 5px; font-size: 13px; }
.job-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; margin-top: 16px; }
.job-content, .job-side-summary { border: 1px solid var(--line); background: #fff; }
.job-content { padding: 28px; }
.job-content section + section { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.job-content h2, .job-side-summary h2 { margin: 0 0 16px; font-size: 17px; }
.prose p { margin: 0 0 9px; color: #3d4c44; font-size: 13px; line-height: 1.85; white-space: pre-wrap; }
.job-side-summary { align-self: start; padding: 20px; }
.job-side-summary dl { margin: 0; }
.job-side-summary dl div { padding: 11px 0; border-bottom: 1px solid var(--line); }
.job-side-summary dt { color: var(--muted); font-size: 10px; }
.job-side-summary dd { margin: 4px 0 0; font-size: 12px; }
.side-consult { width: 100%; min-height: 40px; margin-top: 18px; border: 0; border-radius: 5px; color: #fff; background: var(--green); font-weight: 700; }
.public-attachments { display: grid; gap: 8px; }
.public-attachments a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.attachment-file-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 5px; color: #fff; background: var(--blue); font-size: 10px; }
.public-attachments strong, .public-attachments small { display: block; }
.public-attachments strong { font-size: 12px; }
.public-attachments small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.public-attachments > a > span:last-child { color: var(--green); font-size: 11px; }
.source-attribution { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.source-attribution a { float: right; color: var(--green); }
.source-attribution p { margin: 8px 0 0; }
.page-loading { min-height: 55vh; display: grid; place-items: center; color: var(--muted); font-size: 13px; }

.editor-main { width: min(1240px, calc(100% - 36px)); margin: 0 auto; padding: 28px 0 70px; }
.editor-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.editor-title h1 { margin: 0; font-size: 24px; }
.editor-title > div > span { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.job-editor-form, .attachment-manager { border: 1px solid var(--line); background: #fff; }
.job-editor-form { padding: 24px; }
.editor-section + .editor-section { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.editor-section h2, .attachment-manager h2 { margin: 0 0 16px; font-size: 16px; }
.editor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.editor-grid label, .editor-section > label { display: grid; gap: 6px; }
.editor-grid label.wide { grid-column: span 2; }
.editor-grid label span { color: var(--muted); font-size: 10px; font-weight: 700; }
.editor-grid input, .editor-grid select, .editor-section textarea { width: 100%; border: 1px solid #ccd6d1; border-radius: 5px; color: var(--ink); background: #fff; }
.editor-grid input, .editor-grid select { height: 40px; padding: 0 10px; }
.editor-section textarea { min-height: 150px; padding: 12px; resize: vertical; line-height: 1.6; }
.attachment-manager { align-self: start; padding: 20px; }
.attachment-manager > div:first-child > p:last-child { color: var(--muted); font-size: 10px; line-height: 1.6; }
.attachment-upload { position: relative; min-height: 42px; display: grid; place-items: center; margin: 18px 0; border: 1px dashed #96afd2; border-radius: 6px; color: var(--green); background: #f6f9fe; font-size: 12px; font-weight: 700; }
.attachment-upload input { position: absolute; opacity: 0; pointer-events: none; }
.managed-attachments { display: grid; gap: 8px; }
.managed-file { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 5px; }
.managed-file strong, .managed-file span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.managed-file strong { font-size: 10px; }
.managed-file span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.managed-file a, .managed-file button { border: 0; color: var(--green); background: transparent; font-size: 9px; text-decoration: none; }
.managed-file button { color: var(--red); }
.attachment-empty { padding: 20px 0; color: var(--muted); text-align: center; font-size: 10px; }
.source-box { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.source-box span, .source-box a { display: block; }
.source-box span { color: var(--muted); font-size: 9px; }
.source-box a { margin-top: 5px; overflow: hidden; color: var(--green); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 920px) {
  .admin-shell { grid-template-columns: 145px minmax(0, 1fr); gap: 14px; }
  .match-workspace { grid-template-columns: 320px minmax(0, 1fr); }
  .admin-page .admin-grid, .job-detail-layout, .editor-layout { grid-template-columns: 1fr; }
  .consultant-form { grid-template-columns: 1fr 1fr; }
  .recommendation-row { grid-template-columns: 92px minmax(190px, .8fr) minmax(260px, 1.2fr) auto; }
  .editor-grid { grid-template-columns: 1fr 1fr; }
  .job-side-summary, .attachment-manager { width: 100%; }
  .admin-page .admin-summary { grid-template-columns: repeat(3, 1fr); }
  .admin-page .admin-summary div:nth-child(3) { border-right: 0; }
}

@media (max-width: 680px) {
  .match-header-inner, .admin-header-inner, .detail-header > div, .login-header-inner, .match-main, .job-detail-main, .editor-main { width: min(100% - 24px, 100%); }
  .admin-shell { width: 100%; display: block; }
  .admin-sidebar { top: 68px; z-index: 9; margin-top: 0; border-width: 0 0 1px; overflow-x: auto; }
  .admin-sidebar { scrollbar-width: none; }
  .admin-sidebar::-webkit-scrollbar { display: none; }
  .admin-sidebar nav { width: max-content; min-width: 100%; display: flex; gap: 3px; padding: 7px 12px; }
  .admin-sidebar button { min-height: 36px; flex: 0 0 auto; border-left: 0; border-bottom: 2px solid transparent; padding: 0 10px; }
  .admin-sidebar button.active { border-bottom-color: var(--green); }
  .admin-main { width: min(100% - 24px, 100%); margin: 0 auto; }
  .admin-header-inner { gap: 8px; }
  .admin-header-inner .match-brand, .admin-header-inner .match-brand > div { min-width: 0; }
  .admin-header-inner .match-brand strong, .admin-header-inner .match-brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-header-actions { flex-shrink: 0; gap: 8px; }
  .admin-header-actions .open-match-link, .admin-header-actions .open-test-link, .admin-header-actions .back-link { white-space: nowrap; }
  .login-main { padding: 28px 0; }
  .login-panel { padding: 24px 20px; }
  .match-header-status { display: none; }
  .match-main { padding-top: 22px; }
  .match-intro h1 { font-size: 22px; }
  .match-workspace { display: block; border: 0; }
  .match-input-panel, .match-results-panel { padding: 20px 14px; border: 1px solid var(--line); }
  .match-results-panel { margin-top: 12px; }
  .match-page .empty-results { min-height: 300px; }
  .match-page .job-card { display: block; }
  .match-page .score-block { min-height: 52px; display: flex; align-items: center; justify-content: flex-start; gap: 6px; border: 0; border-bottom: 1px solid var(--line); padding: 0 14px; }
  .match-page .score-block span { margin: 0; }
  .match-page .score-block em { margin: 0 0 0 auto; }
  .consult-fab { bottom: max(10px, env(safe-area-inset-bottom)); min-height: 58px; }
  .back-to-top { right: 12px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 70px); }
  .admin-main { padding-top: 18px; }
  .admin-page .admin-summary { grid-template-columns: 1fr 1fr; }
  .admin-page .admin-summary div:nth-child(3) { border-right: 1px solid var(--line); }
  .admin-page .admin-summary div:nth-child(even) { border-right: 0; }
  .admin-page .admin-grid { display: flex; flex-direction: column; }
  .admin-page .sync-panel { order: -1; }
  .admin-page .source-row { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 8px 0; }
  .admin-page .source-stats, .admin-page .adapter-badge { display: none; }
  .account-row { grid-template-columns: minmax(140px, 1fr) auto; }
  .account-row > time { display: none; }
  .account-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .lead-table-actions { align-items: stretch; flex-direction: column; }
  .lead-table-actions select, .lead-table-actions a { min-width: 132px; }
  .admin-title-row .live-indicator, .settings-note { display: none; }
  .consultant-form { grid-template-columns: 1fr; }
  .consultant-form .wide { grid-column: auto; }
  .recommendation-create, .recommendation-row { grid-template-columns: 1fr; align-items: stretch; }
  .recommendation-row-status { align-self: auto; }
  .recommendation-row-actions { justify-content: flex-end; }
  .detail-header .match-brand { display: none; }
  .admin-job-page .editor-brand { display: none; }
  .job-detail-main { padding-top: 14px; }
  .job-detail-hero, .job-content { padding: 18px; }
  .job-detail-heading h1 { font-size: 22px; }
  .detail-score { min-width: 62px; }
  .detail-facts { grid-template-columns: 1fr 1fr; gap: 15px; }
  .job-detail-layout { margin-top: 10px; }
  .job-side-summary { display: none; }
  .source-attribution a { float: none; display: block; margin-top: 8px; }
  .editor-title { align-items: flex-start; }
  .editor-layout { display: block; }
  .job-editor-form { padding: 16px; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-grid label.wide { grid-column: auto; }
  .attachment-manager { margin-top: 12px; }
}

@media (max-width: 480px) {
  .admin-header-actions .open-match-link, .admin-header-actions .open-test-link { display: none; }
}

@media (max-width: 360px) {
  .admin-page .admin-header-inner .match-brand { gap: 0; }
  .admin-page .admin-header-inner .brand-logo,
  .admin-page .admin-header-inner .match-brand small { display: none; }
}
