:root {
  --bg: #f4f6f7;
  --panel: #ffffff;
  --panel-2: #edf3f1;
  --ink: #182321;
  --muted: #65726f;
  --line: #dde5e2;
  --line-strong: #cbd7d3;
  --accent: #0b776d;
  --accent-2: #c75b39;
  --accent-3: #3764a7;
  --warn: #b7791f;
  --danger: #b42318;
  --good: #137333;
  --radius: 7px;
  --shadow: 0 10px 28px rgba(20, 35, 31, 0.06);
  --shadow-soft: 0 5px 16px rgba(20, 35, 31, 0.05);
}

.pm-console .content {
  padding: 20px 24px 32px;
}

.pm-console .kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pm-kpi {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.pm-permission-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 140px minmax(140px, 1fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.pm-permission-form input,
.pm-permission-form select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.48;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body:not(.pm-console) {
  --bg: #fff3e7;
  --panel-2: #fff0df;
  --line: #ead8c8;
  --line-strong: #d9bea7;
  --accent: #b85f22;
  --accent-2: #df8a3d;
  --shadow: 0 14px 34px rgba(118, 62, 24, 0.08);
  --shadow-soft: 0 7px 20px rgba(118, 62, 24, 0.07);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 202, 138, 0.42), transparent 34%),
    linear-gradient(135deg, #fff8f1 0%, #fff0df 46%, #f8dfc7 100%);
}

body:not(.pm-console) .sidebar {
  background: linear-gradient(180deg, #3a2418 0%, #5b321b 58%, #7a431f 100%);
  box-shadow: 10px 0 28px rgba(91, 50, 27, 0.12);
}

body:not(.pm-console) .nav-item:hover,
body:not(.pm-console) .nav-item.active {
  background: rgba(255, 168, 88, 0.18);
  color: #fff8f1;
}

body:not(.pm-console) .topbar {
  background: rgba(255, 248, 241, 0.92);
  border-bottom-color: rgba(205, 148, 95, 0.34);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  min-height: 100dvh;
  overflow: auto;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #eef8f5 0%, #f7f7f2 48%, #eef3fb 100%);
}

.login-card {
  display: grid;
  width: min(440px, 100%);
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-brand {
  margin-bottom: 0;
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.login-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #ffd3cc;
  border-radius: 6px;
  background: #fff4f2;
  color: var(--danger);
  font-size: 13px;
}

.login-error.success {
  border-color: #bfe6cc;
  background: #edf8f1;
  color: var(--good);
}

.login-debug {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}

.login-debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.login-debug pre {
  max-height: 170px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #33423d;
  font-size: 12px;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
input,
select,
textarea,
summary {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 119, 109, 0.12);
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #10201d;
  color: #f4fbf9;
  padding: 20px 14px;
}

.public-share-mode .sidebar .nav,
.public-share-mode .topbar-actions {
  display: none;
}

.share-status-page {
  display: grid;
  min-height: calc(100vh - 128px);
  place-items: center;
  padding: 24px;
}

.share-status-card {
  display: grid;
  width: min(460px, 100%);
  justify-items: center;
  gap: 12px;
  padding: 36px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.share-status-card h3 {
  margin: 6px 0 0;
  font-size: 24px;
}

.share-status-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.share-status-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: #eef8f5;
  color: var(--accent);
  font-size: 28px;
  font-weight: 800;
}

.share-status-icon.success {
  background: #edf8f1;
  color: var(--good);
}

.share-status-icon.error {
  background: #fff4f2;
  color: var(--danger);
}

.loading-dot::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 3px solid #b9ddd5;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  background: #e6f4ef;
  color: #10201d;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
  line-height: 1.35;
}

.brand p {
  margin: 4px 0 0;
  color: #b9c8c4;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-title {
  width: 100%;
  min-height: 34px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0 11px;
  color: #e8f1ee;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: left;
}

.nav-group-title::after {
  content: "▸";
  float: right;
  color: #8ea49f;
}

.nav-group.open .nav-group-title {
  background: rgba(255, 255, 255, 0.04);
  color: #d9e6e2;
}

.nav-group.open .nav-group-title::after {
  content: "▾";
}

.nav-group-items {
  display: none;
  gap: 6px;
}

.nav-group.open .nav-group-items {
  display: grid;
}

.nav-item {
  width: 100%;
  min-height: 31px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #d9e6e2;
  font-size: 12px;
  text-align: left;
  padding: 0 10px 0 20px;
}

.nav-item:hover,
.nav-item.active {
  background: #203632;
  color: #ffffff;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 24px;
  background: rgba(244, 246, 247, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.topbar h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: end;
}

.role-controls {
  display: flex;
  gap: 10px;
  align-items: end;
  padding-right: 4px;
}

.role-controls label {
  display: grid;
  gap: 4px;
}

.role-controls select {
  min-height: 34px;
  min-width: 132px;
  padding: 0 9px;
}

.content {
  padding: 20px 24px 40px;
}

.permission-note {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #b9ddd5;
  border-radius: var(--radius);
  background: #eef8f5;
  color: #24413c;
}

.permission-note span,
.muted-text {
  color: var(--muted);
  line-height: 1.6;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.small-btn {
  min-height: 34px;
  border-radius: 6px;
  padding: 0 12px;
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-btn {
  background: var(--accent);
  color: #fff;
}

.ghost-btn,
.small-btn {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

.danger-btn {
  background: #fff4f2;
  color: var(--danger);
  border-color: #ffd3cc;
}

.small-btn {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

.primary-btn:hover {
  background: #096a61;
}

.ghost-btn:hover,
.small-btn:hover {
  border-color: var(--line-strong);
  background: #f7faf9;
}

.small-btn.accent-btn {
  border-color: #0b776d;
  background: #0b776d;
  color: #fff;
}

.small-btn.accent-btn:hover {
  border-color: #095f58;
  background: #095f58;
  color: #fff;
}

.warm-btn {
  border-color: #c75b39;
  background: #c75b39;
}

.warm-btn:hover {
  border-color: #a9462a;
  background: #a9462a;
}

.danger-text {
  color: var(--danger);
}

.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.template-editor {
  display: grid;
  gap: 10px;
}

.template-editor-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(150px, 1fr) 96px minmax(220px, 1.2fr) minmax(260px, 1.4fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfc;
}

.template-editor-row label {
  display: grid;
  gap: 6px;
}

.template-editor-row textarea {
  min-height: 42px;
  resize: vertical;
}

.grid {
  display: grid;
  gap: 12px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.two-col {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  align-items: start;
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-header h3,
.form-title {
  margin: 0;
  font-size: 15px;
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-body {
  padding: 16px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfa;
}

.account-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.account-grid strong {
  overflow-wrap: anywhere;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 32, 29, 0.42);
}

.modal-panel {
  width: min(720px, 100%);
  max-height: min(720px, calc(100dvh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(16, 32, 29, 0.22);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.modal-body {
  padding: 16px;
}

.check-list {
  display: grid;
  max-height: 280px;
  overflow: auto;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfa;
}

.employee-picker {
  display: grid;
  gap: 8px;
}

.employee-search {
  min-height: 34px;
}

.check-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
}

.check-row input {
  width: auto;
  margin-top: 3px;
}

.check-row span {
  display: grid;
  gap: 2px;
}

.check-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.multi-select {
  display: grid;
  gap: 8px;
}

.multi-select summary {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.multi-select[open] summary {
  border-color: var(--accent);
}

.icon-btn {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 19px;
  line-height: 1;
}

.stat {
  padding: 12px 13px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1.1;
}

.stat small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.stats-grid .stat {
  min-height: 104px;
  text-align: left;
}

.stat-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.stat-breakdown span {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  gap: 4px;
  border: 1px solid #dbe9e5;
  border-radius: 999px;
  padding: 0 7px;
  background: #f3faf7;
  color: #3f5a55;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
}

.stat-breakdown b {
  color: #173e37;
  font-weight: 750;
}

.dashboard-action-panel .panel-header {
  padding: 11px 14px;
}

.interview-dashboard {
  margin-bottom: 12px;
  padding: 10px;
}

.interview-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.mini-stat {
  min-height: 78px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #fbfdfc 0%, #f6f9f8 100%);
  box-shadow: none;
}

.mini-stat strong {
  font-size: 20px;
}

.mini-stat small {
  font-size: 11px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.inline-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar input,
.toolbar select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  background: #fff;
}

.employee-filter-bar {
  align-items: flex-end;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.employee-filter-bar label {
  display: grid;
  gap: 6px;
  min-width: 160px;
}

.filter-panel {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdfc 0%, #f3f7f5 100%);
}

.filter-panel-header,
.bulk-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-panel-header strong,
.bulk-panel-title strong {
  color: var(--ink);
  font-size: 14px;
}

.filter-panel-header span,
.bulk-panel-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.filter-fields,
.bulk-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.filter-fields label,
.bulk-fields label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filter-fields input,
.filter-fields select,
.bulk-fields input,
.bulk-fields select {
  min-height: 34px;
  border-color: #d9e2df;
  background: #fff;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.bulk-panel {
  display: grid;
  gap: 10px;
  margin: 12px 16px 0;
  padding: 12px;
  border: 1px dashed #c7d8d3;
  border-radius: var(--radius);
  background: #fff;
}

.filter-panel .bulk-panel {
  margin: 2px 0 0;
}

.talent-bulk-panel {
  border-color: #efc98d;
  background: linear-gradient(180deg, #fff9ef 0%, #ffffff 88%);
}

.people-table-wrap,
.talent-table-wrap {
  border-radius: 0 0 var(--radius) var(--radius);
  background: #fff;
}

.table-wrap {
  position: relative;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-x: contain;
  border-radius: 0 0 var(--radius) var(--radius);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.sticky-actions table {
  min-width: 1320px;
}

.sticky-action-col {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 188px;
  background: #ffffff;
  box-shadow: -6px 0 14px rgba(20, 35, 31, 0.07);
}

th.sticky-action-col {
  z-index: 4;
  background: #f9fbfa;
}

tr.is-expanded > td {
  border-top: 2px solid #72b9b0;
  background: #eef7f5;
}

.talent-detail-cell {
  padding: 0;
  border-bottom: 2px solid #b8d7d1;
  background: #e9f3f0;
}

.talent-detail-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  padding: 14px 16px 18px;
  border-left: 5px solid #2d8a7f;
  border-bottom: 1px solid #b8d7d1;
  background:
    linear-gradient(90deg, rgba(45, 138, 127, 0.12) 0, rgba(45, 138, 127, 0) 180px),
    linear-gradient(180deg, #e8f4f1 0%, #f6fbfa 100%);
}

.talent-detail-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #b7d8d2;
  border-radius: var(--radius);
  background: #dff0ec;
}

.talent-detail-banner div {
  display: grid;
  gap: 2px;
}

.talent-detail-banner strong {
  font-size: 14px;
  color: #102c28;
}

.talent-detail-banner span:not(.tag) {
  color: #526c67;
  font-size: 12px;
}

.talent-status-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  padding: 8px;
  border: 1px solid #8bc6bd;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(20, 35, 31, 0.08);
}

.talent-status-inline-form label {
  display: grid;
  min-width: 190px;
  gap: 4px;
  color: #23544d;
}

.talent-status-inline-form select {
  min-height: 32px;
  border-color: #78bcb2;
  background: #f5fffc;
}

.interview-flow-btn {
  background: #256f5a;
  border-color: #256f5a;
}

.interview-flow-btn:hover {
  background: #1d5b49;
  border-color: #1d5b49;
}

.interview-assign-btn {
  border-color: #7b9f98;
  background: #f4faf8;
  color: #1f4f47;
}

.talent-detail-quick-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
}

.talent-detail-panel section {
  min-width: 0;
  padding: 14px;
  border: 1px solid #cadbd7;
  border-radius: var(--radius);
  background: #fff;
}

.talent-highlight {
  border-width: 2px;
  box-shadow: 0 10px 24px rgba(20, 35, 31, 0.08);
}

.talent-highlight-hr,
.talent-edit-card-hr {
  border-color: #3ca99c;
  background: linear-gradient(180deg, #ddf4ee 0%, #ffffff 78%);
}

.talent-highlight-bg,
.talent-edit-card-bg {
  border-color: #de9b3c;
  background: linear-gradient(180deg, #fff0d7 0%, #ffffff 78%);
}

.talent-detail-card {
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(20, 35, 31, 0.07);
}

.talent-detail-panel h4 {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 0 10px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf4f2;
  color: #193b36;
  font-size: 14px;
}

.talent-detail-panel p {
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.65;
}

.talent-inline-form {
  display: grid;
  gap: 10px;
}

.talent-inline-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 650;
}

.talent-inline-form textarea {
  min-height: 118px;
  background: rgba(255, 255, 255, 0.92);
}

.inline-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.compact-actions {
  margin-top: 0;
}

.talent-edit-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.talent-edit-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.talent-edit-card h4 {
  margin: 0;
  font-size: 15px;
}

.compact-grid {
  gap: 10px;
}

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

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  background: #f9fbfa;
  white-space: nowrap;
}

td {
  font-size: 12.5px;
  line-height: 1.5;
}

.people-table th,
.talent-table th {
  background: #f4f8f6;
}

.people-table tbody tr:hover > td,
.talent-table tbody tr:hover > td {
  background: #fbfdfc;
}

.people-table td:nth-child(2) strong,
.talent-table td:nth-child(2) strong {
  font-size: 13px;
}

.talent-table td:nth-child(6) {
  background: #fffdf8;
}

.talent-table {
  table-layout: fixed;
}

.talent-table th:nth-child(1),
.talent-table td:nth-child(1) {
  width: 38px;
}

.talent-table th:nth-child(2),
.talent-table td:nth-child(2) {
  width: 180px;
}

.talent-table th:nth-child(3),
.talent-table td:nth-child(3) {
  width: 118px;
}

.talent-table th:nth-child(4),
.talent-table td:nth-child(4) {
  width: 132px;
}

.talent-table th:nth-child(5),
.talent-table td:nth-child(5) {
  width: 260px;
}

.talent-table th:nth-child(6),
.talent-table td:nth-child(6) {
  width: 170px;
}

.talent-table th:nth-child(7),
.talent-table td:nth-child(7) {
  width: 250px;
}

.talent-table th:nth-child(8),
.talent-table td:nth-child(8) {
  width: 230px;
}

.talent-table th:nth-child(9),
.talent-table td:nth-child(9) {
  width: 142px;
}

.talent-table .tag {
  white-space: nowrap;
}

.talent-candidate-cell,
.talent-profile-cell,
.talent-status-cell {
  line-height: 1.45;
}

.talent-candidate-cell > *,
.talent-profile-cell > *,
.talent-status-cell > * {
  display: block;
  margin-bottom: 5px;
}

.talent-candidate-cell strong {
  color: #142320;
}

.talent-status-cell small,
.talent-profile-cell small,
.talent-summary-cell small,
.talent-review-cell small,
.talent-interview-cell small {
  color: var(--muted);
}

.talent-review-cell small {
  display: block;
  margin-top: 3px;
}

.talent-ai-mini {
  margin-top: 7px;
}

.talent-review-cell b,
.talent-interview-cell b {
  color: #536761;
  font-size: 11px;
}

.talent-interview-cell {
  display: grid;
  gap: 6px;
}

.tag {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1.2;
  background: var(--panel-2);
  color: #24413c;
}

.tag.good {
  background: #e9f6ee;
  color: var(--good);
}

.tag.warn {
  background: #fff7e8;
  color: var(--warn);
}

.tag.danger {
  background: #fff1ef;
  color: var(--danger);
}

.tag.blue {
  background: #edf4ff;
  color: var(--accent-3);
}

.resume-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.resume-file-actions a {
  text-decoration: none;
}

.resume-text-preview pre {
  max-height: 70vh;
  overflow: auto;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 5px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  min-height: 34px;
  padding: 8px 10px;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.form-divider {
  grid-column: 1 / -1;
  width: 100%;
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebe9;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.radar {
  display: grid;
  gap: 12px;
}

.radar-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.timeline-item strong {
  display: block;
  margin-bottom: 4px;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.rule-box {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfa;
}

.rule-box strong {
  color: var(--ink);
}

.rule-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.talent-global-search {
  position: fixed;
  right: 22px;
  top: 82px;
  z-index: 900;
  width: min(560px, calc(100vw - 44px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(16, 32, 29, 0.16);
  backdrop-filter: blur(12px);
}

.talent-global-search.dragging {
  user-select: none;
}

.talent-global-search-handle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: #f7fbfa;
  color: var(--muted);
  cursor: grab;
}

.talent-global-search-handle:active {
  cursor: grabbing;
}

.talent-global-search-handle strong {
  color: var(--ink);
  font-size: 13px;
}

.talent-global-search-handle span {
  font-size: 12px;
}

.talent-global-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 10px;
}

.talent-global-search-panel {
  display: none;
  max-height: 480px;
  overflow: auto;
  padding: 0 10px 10px;
  border-top: 1px solid var(--line);
}

.talent-global-search.open .talent-global-search-panel {
  display: grid;
  gap: 10px;
}

.talent-search-results {
  display: grid;
  gap: 8px;
}

.talent-search-result {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.talent-search-result:hover {
  border-color: #a9cac4;
  background: #f6fbfa;
}

.talent-search-result span,
.talent-search-result small {
  color: var(--muted);
}

.empty {
  padding: 34px 16px;
  text-align: center;
  color: var(--muted);
}

.empty h3 {
  margin: 0 0 6px;
  color: var(--ink);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-group {
    align-content: start;
  }

  .two-col,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .content {
    padding: 18px;
  }

  .form-grid,
  .nav,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .talent-global-search {
    right: 12px;
    top: 72px;
    width: calc(100vw - 24px);
  }

  .talent-global-search-form {
    grid-template-columns: 1fr;
  }

  .filter-panel-header,
  .bulk-panel-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .filter-fields,
  .bulk-fields {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .filter-actions button {
    flex: 1 1 120px;
  }

  .bulk-panel {
    margin-right: 12px;
    margin-left: 12px;
  }
}
