:root {
  color-scheme: light;
  --ink: #26352c;
  --muted: #77847b;
  --subtle: #9aa59d;
  --line: #e4eae5;
  --canvas: #f5f7f4;
  --surface: #fff;
  --green: #245b43;
  --green-strong: #1a4b35;
  --green-soft: #eaf3ec;
  --gold-soft: #f8f0e4;
  --blue-soft: #edf2f8;
  --red-soft: #f8eeec;
  --shadow: 0 8px 26px rgba(34, 55, 43, .045);
  font-family: "DM Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.site-header { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(18px, 4vw, 56px); background: #17372b; color: #f2f6f3; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; padding: 7px; border: 1px solid rgba(255,255,255,.23); border-radius: 9px; background: rgba(255,255,255,.08); }
.brand-mark i { display: block; border-radius: 2px; background: #d6e7d9; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { opacity: .56; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.brand-copy small { color: #aac0b3; font-size: 9px; letter-spacing: .02em; }
.account-actions { display: flex; align-items: center; gap: 9px; }
.signed-in { display: flex; align-items: center; gap: 8px; color: #e2ebe4; font-size: 10px; }
.avatar { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #dceade; color: #275039; font-size: 9px; font-weight: 700; }
.role-badge { padding: 4px 6px; border: 1px solid rgba(225,238,228,.16); border-radius: 5px; color: #b6c9bb; font-size: 8px; }
.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 1px solid transparent; border-radius: 6px; font-size: 10px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, transform .12s; }
.button:hover { transform: translateY(-1px); }
.button-light { border-color: #dce5de; background: #fff; color: #42534a; }
.button-light:hover { border-color: #b8cbbd; background: #fbfdfb; }
.site-header .button-light { min-height: 32px; border-color: rgba(223, 239, 226, .25); background: rgba(255,255,255,.08); color: #edf4ef; font-size: 9px; }
.site-header .button-light:hover { background: rgba(255,255,255,.15); }
.button-primary { border-color: var(--green); background: var(--green); color: #fff; box-shadow: 0 3px 7px rgba(36,91,67,.1); }
.button-primary:hover { border-color: var(--green-strong); background: var(--green-strong); }
.button:focus-visible, .icon-button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(64,128,91,.23); outline-offset: 2px; }

.page-container { width: min(1480px, 100%); margin: 0 auto; padding: 31px clamp(16px, 3.8vw, 52px) 25px; }
.preview-notice { margin-bottom: 18px; padding: 9px 12px; border: 1px solid #eadfc5; border-radius: 7px; background: #fbf7ec; color: #81704e; font-size: 9px; }
.preview-notice strong { margin-right: 7px; color: #80633c; font-weight: 700; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 21px; }
.eyebrow { margin: 0 0 7px; color: var(--green); font-size: 9px; font-weight: 700; letter-spacing: .13em; }
h1, h2, h3, p { margin-top: 0; }
.page-intro h1 { margin: 0 0 7px; color: #26362d; font-size: clamp(25px, 2.2vw, 31px); font-weight: 600; letter-spacing: -.04em; line-height: 1.2; }
.admin-actions { display: flex; align-items: center; gap: 7px; }
.message { min-height: 0; color: #426f4d; font-size: 10px; }
.message:not(:empty) { margin: -8px 0 12px; padding: 8px 11px; border: 1px solid #d8e7da; border-radius: 6px; background: #f2f8f2; }
.message.is-error { border-color: #f0dcd8; background: #fbf4f3; color: #a4564e; }

.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.table-toolbar { min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.table-title { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.table-title h2 { margin: 0; color: #334339; font-size: 12px; font-weight: 600; }
.row-count { padding: 4px 6px; border-radius: 4px; background: #f1f5f1; color: #79867d; font-size: 8px; }
.table-filters { display: flex; align-items: center; justify-content: flex-end; gap: 7px; width: min(100%, 400px); }
.search-field { min-width: 130px; height: 32px; flex: 1; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #e1e8e2; border-radius: 5px; background: #fff; color: #94a097; font-size: 15px; }
.search-field input { width: 100%; padding: 0; border: 0; outline: 0; color: var(--ink); font-size: 9px; }
.search-field input::placeholder { color: #a3aca6; }
.table-filters select { height: 32px; max-width: 140px; padding: 0 22px 0 9px; border: 1px solid #e1e8e2; border-radius: 5px; background: #fff; color: #5f6d64; font-size: 9px; }
.table-scroll { overflow: auto; }
table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; }
table.admin-table { min-width: 1240px; }
thead { position: sticky; top: 0; z-index: 1; background: #fafbfa; }
th { height: 37px; padding: 0 11px; border-bottom: 1px solid #e9eee9; color: #87928a; font-size: 9px; font-weight: 500; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 16px; }
td { max-width: 250px; height: 47px; padding: 8px 11px; border-bottom: 1px solid #f0f3f0; color: #59675f; font-size: 9px; vertical-align: middle; }
tbody tr.data-row:last-of-type td { border-bottom: 0; }
tbody tr.data-row:hover { background: #fbfcfb; }
.company-cell strong { display: block; max-width: 220px; overflow: hidden; color: #2b3b31; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.company-cell .discussion-toggle { margin-top: 5px; }
.position-cell, .notes-cell { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.status-pill { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 5px; background: #eff3ef; color: #69766d; font-size: 8px; white-space: nowrap; }
.status-pill.status-interview { background: var(--blue-soft); color: #4e6f98; }
.status-pill.status-offer { background: var(--green-soft); color: #3e724d; }
.status-pill.status-rejected { background: var(--red-soft); color: #a55b53; }
.status-pill.status-pending { background: var(--gold-soft); color: #9a713e; }
.muted-cell { color: #aab3ac; }
.row-link { color: #4d765d; text-decoration: none; white-space: nowrap; }
.row-link:hover { text-decoration: underline; }
.row-actions { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.row-action { padding: 3px 0; border: 0; background: transparent; color: #5e7f65; font-size: 8px; }
.row-action:hover { color: #245b43; text-decoration: underline; }
.row-action.delete-action { color: #a16e68; }
.discussion-toggle { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 2px 0; border: 0; border-radius: 4px; background: transparent; color: #7a8c80; font-size: 8px; }
.discussion-toggle:hover, .discussion-toggle[aria-expanded="true"] { border: 0; background: transparent; color: #245b43; text-decoration: underline; }
.comment-new-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #37a36a; box-shadow: 0 0 0 2px #eaf3ec; }
.table-footer { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; border-top: 1px solid var(--line); color: #96a198; font-size: 8px; }
.empty-state { display: grid; justify-items: center; padding: 52px 18px 58px; text-align: center; }
.empty-icon { width: 41px; height: 41px; display: grid; place-items: center; margin-bottom: 11px; border-radius: 10px; background: #edf4ee; color: #6b9174; font-size: 20px; }
.empty-state h2 { margin: 0 0 6px; color: #435248; font-size: 13px; font-weight: 600; }
.empty-state p { max-width: 340px; margin: 0 0 13px; color: #8c9890; font-size: 9px; line-height: 1.7; }

.discussion-row > td { height: auto; padding: 0; border-bottom: 1px solid var(--line); background: #fcfdfc; }
.discussion-panel { width: min(860px, calc(100% - 32px)); max-width: 860px; margin: 0 16px; padding: 16px 4px 17px; }
.discussion-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.discussion-heading strong { color: #4a5d50; font-size: 10px; font-weight: 600; }
.discussion-heading small { color: #9ba69e; font-size: 8px; }
.comment-list { display: grid; }
.comment-item { padding: 9px 0; border-top: 1px solid #eff2ef; }
.comment-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.comment-identity { display: flex; align-items: baseline; gap: 9px; }
.comment-identity strong { color: #59695f; font-size: 9px; font-weight: 600; }
.comment-identity time { color: #a2aca5; font-size: 8px; }
.comment-content { margin: 5px 0 0; color: #58675e; font-size: 9px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-actions { display: flex; align-items: center; gap: 10px; }
.comment-action { padding: 2px 0; border: 0; background: transparent; color: #69816f; font-size: 8px; }
.comment-action:hover { color: #245b43; text-decoration: underline; }
.comment-delete { color: #a16e68; }
.comment-replies { margin: 8px 0 0 12px; padding: 0 0 0 11px; border-left: 2px solid #e2ece3; }
.comment-replies .comment-item { padding: 6px 0 2px; border-top: 0; }
.comment-empty { margin: 15px 0; color: #99a39c; font-size: 9px; text-align: center; }
.comment-composer { margin-top: 9px; padding-top: 11px; border-top: 1px solid #edf1ed; }
.replying-to { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; color: #6d8873; font-size: 9px; }
.replying-to button { border: 0; background: transparent; color: #9aa59d; font-size: 8px; }
.compose-row { display: flex; align-items: flex-end; gap: 8px; }
.compose-row textarea { min-height: 38px; max-height: 110px; flex: 1; resize: vertical; padding: 8px 10px; border: 1px solid #e1e8e2; border-radius: 6px; outline: 0; background: #fff; color: #34423a; font-size: 9px; line-height: 1.6; }
.compose-row textarea:focus { border-color: #87ac91; box-shadow: 0 0 0 3px rgba(82,134,96,.1); }
.compose-row textarea::placeholder { color: #a8b1aa; }
.comment-submit { min-height: 32px; padding: 0 11px; font-size: 9px; }
.login-to-comment { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 11px; border-top: 1px solid #edf1ed; color: #89958d; font-size: 9px; }
.thread-loading { padding: 16px 0; color: #9ba69e; font-size: 9px; text-align: center; }

.auth-dialog, .record-dialog { width: min(470px, calc(100vw - 24px)); max-height: min(90vh, 800px); padding: 22px 24px 21px; overflow: auto; border: 1px solid #dfe7e0; border-radius: 12px; background: #fff; box-shadow: 0 24px 80px rgba(19,40,27,.2); color: var(--ink); }
.record-dialog { width: min(620px, calc(100vw - 24px)); }
.auth-dialog::backdrop, .record-dialog::backdrop { background: rgba(18,34,25,.4); backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 15px; }
.dialog-heading .eyebrow { margin-bottom: 4px; }
.dialog-heading h2 { margin: 0; color: #29392f; font-size: 19px; font-weight: 600; }
.icon-button { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 6px; background: #f2f5f2; color: #657269; font-size: 19px; line-height: 1; }
.icon-button:hover { background: #e8eee9; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 15px; padding: 4px; border-radius: 6px; background: #f2f5f2; }
.auth-tab { min-height: 30px; border: 0; border-radius: 4px; background: transparent; color: #829087; font-size: 9px; }
.auth-tab.active { background: #fff; color: #315e42; box-shadow: 0 1px 4px rgba(30,55,40,.09); font-weight: 600; }
.auth-message { min-height: 0; color: #a4564e; font-size: 9px; line-height: 1.6; }
.auth-message:not(:empty) { margin: -5px 0 9px; padding: 7px 9px; border: 1px solid #f1dedb; border-radius: 5px; background: #fcf6f5; }
.auth-message.is-success:not(:empty) { border-color: #dceadd; background: #f3f8f3; color: #52795c; }
.auth-form { display: grid; gap: 12px; }
.form-field { display: grid; gap: 6px; color: #59675f; font-size: 9px; font-weight: 600; }
.form-field b { color: #b85e50; font-weight: 500; }
.form-field small { color: #9aa49d; font-size: 8px; font-weight: 400; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #dfe6e0; border-radius: 5px; outline: 0; background: #fff; color: #34423a; font-size: 10px; font-weight: 400; }
.form-field textarea { min-height: 72px; resize: vertical; line-height: 1.6; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #87ac91; box-shadow: 0 0 0 3px rgba(82,134,96,.1); }
.form-submit { width: 100%; min-height: 37px; margin-top: 3px; }
.auth-note { margin: 13px 0 0; color: #9ba69e; font-size: 8px; line-height: 1.7; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 13px; }
.form-wide { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; padding-top: 12px; border-top: 1px solid #edf1ed; }

@media (max-width: 760px) {
  .site-header { min-height: 58px; padding: 0 15px; }
  .page-container { padding: 23px 14px 20px; }
  .page-intro { align-items: flex-start; flex-direction: column; gap: 15px; }
  .admin-actions { width: 100%; }
  .admin-actions .button { flex: 1; }
  table.admin-table { min-width: 1160px; }
  .table-toolbar { align-items: flex-start; flex-direction: column; padding: 13px 13px 11px; }
  .table-filters { width: 100%; }
  .table-filters select { max-width: 125px; }
  .table-footer { align-items: flex-start; flex-direction: column; gap: 5px; padding: 9px 13px; }
  .page-footer { align-items: flex-start; flex-direction: column; gap: 5px; }
}
@media (max-width: 520px) {
  .signed-in { gap: 5px; font-size: 8px; }
  .role-badge { display: none; }
  .account-actions { gap: 5px; }
  .site-header .button-light { min-height: 29px; padding: 0 8px; font-size: 8px; }
  .page-intro h1 { font-size: 25px; }
  .admin-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .admin-actions #addButton { grid-column: 1 / -1; }
  .auth-dialog, .record-dialog { padding: 18px 16px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-wide { grid-column: auto; }
  .discussion-panel { width: calc(100% - 24px); margin: 0 12px; padding: 13px 0 14px; }
  .discussion-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .compose-row { align-items: stretch; flex-direction: column; }
  .comment-submit { align-self: flex-end; }
  .login-to-comment { align-items: flex-start; flex-direction: column; }
}
