:root {
  --ink: #172033;
  --muted: #6b7486;
  --line: #dfe4ec;
  --line-strong: #cbd3df;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --sidebar: #121a2a;
  --blue: #2267e8;
  --blue-soft: #eaf1ff;
  --green: #16865f;
  --green-soft: #e8f6f0;
  --amber: #b66a12;
  --amber-soft: #fff5e5;
  --red: #c43d4f;
  --red-soft: #fff0f2;
  --shadow: 0 16px 36px rgba(25, 38, 61, 0.08);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #eef2f7;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

[hidden] {
  display: none !important;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  overflow-y: auto;
  color: #dce4f2;
  background: var(--sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  color: white;
  background: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: white;
  font-size: 15px;
}

.brand span {
  margin-top: 3px;
  color: #8997ae;
  font-size: 12px;
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav a {
  padding: 11px 12px;
  border-radius: 6px;
  color: #9fadbf;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.side-nav a:hover,
.side-nav a.active {
  color: white;
  background: #202b3f;
}

.side-section {
  display: grid;
  gap: 10px;
}

.side-title {
  padding: 0 6px;
  color: #718097;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.stat-grid div {
  min-width: 0;
  padding: 10px 7px;
  border: 1px solid #2b374c;
  border-radius: 6px;
  background: #172237;
}

.stat-grid span,
.stat-grid strong {
  display: block;
}

.stat-grid span {
  overflow: hidden;
  color: #7f8da3;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-grid strong {
  margin-top: 4px;
  color: white;
  font-size: 20px;
}

.platform-launchers {
  display: grid;
  gap: 6px;
}

.platform-launchers button,
.filter-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  color: #aab6c9;
  background: transparent;
  text-align: left;
  font-size: 13px;
}

.platform-launchers button:hover,
.filter-button:hover,
.filter-button.active {
  color: white;
  background: #202b3f;
}

.platform-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
}

.platform-dot.boss {
  background: #00c2a8;
}

.platform-dot.liepin {
  background: #e94e42;
}

.status-filter {
  gap: 3px;
}

.manual-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid #2b374c;
  border-radius: 6px;
  color: #8f9cb0;
  font-size: 12px;
}

.mode-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4bd19b;
  box-shadow: 0 0 0 4px rgba(75, 209, 155, 0.12);
}

.workspace {
  min-width: 0;
  padding: 28px clamp(22px, 3vw, 48px) 56px;
}

.workspace-header,
.queue-heading,
.panel-heading,
.drawer-header,
.score-row,
.form-actions,
.result-actions,
.queue-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workspace-header {
  margin-bottom: 18px;
}

.eyebrow {
  color: #7d8798;
  font-size: 10px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 5px;
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 13px;
}

.primary-button,
.outline-button,
.text-button,
.profile-alert button,
.upload-row button {
  min-height: 38px;
  border-radius: 6px;
  font-weight: 700;
}

.primary-button {
  padding: 0 18px;
  border: 1px solid var(--blue);
  color: white;
  background: var(--blue);
}

.primary-button:hover {
  background: #1659d3;
}

.outline-button {
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: white;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.outline-button:hover {
  border-color: #9eabbc;
  background: var(--surface-soft);
}

.text-button {
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  color: var(--blue);
  background: transparent;
}

.profile-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid #f2d39f;
  border-radius: 6px;
  background: var(--amber-soft);
}

.profile-alert div {
  min-width: 0;
}

.profile-alert strong,
.profile-alert span {
  display: block;
}

.profile-alert strong {
  color: #8f510d;
  font-size: 14px;
}

.profile-alert span {
  margin-top: 3px;
  color: #9e6a2f;
  font-size: 12px;
}

.profile-alert button {
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid #d69b46;
  color: #8f510d;
  background: transparent;
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.job-input-panel,
.analysis-panel {
  min-width: 0;
  padding: 24px;
}

.job-input-panel {
  display: grid;
  gap: 16px;
  border-right: 1px solid var(--line);
}

.panel-heading span {
  color: var(--muted);
  font-size: 11px;
}

.panel-heading h2 {
  margin-top: 4px;
}

.platform-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.platform-switch button {
  min-width: 62px;
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.platform-switch button.active {
  color: var(--blue);
  background: white;
  box-shadow: 0 2px 7px rgba(24, 39, 67, 0.08);
}

label {
  display: grid;
  gap: 7px;
}

label > span {
  color: #495368;
  font-size: 12px;
  font-weight: 750;
}

label > small {
  color: var(--muted);
  line-height: 1.5;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: none;
  color: var(--ink);
  background: white;
}

input {
  height: 40px;
  padding: 0 12px;
}

textarea {
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.6;
}

input:focus,
textarea:focus {
  border-color: #6f9ff7;
  box-shadow: 0 0 0 3px rgba(34, 103, 232, 0.11);
}

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

.jd-field textarea {
  min-height: 240px;
}

.form-actions {
  justify-content: flex-start;
}

.analysis-panel {
  min-height: 572px;
  background: #fbfcfe;
}

.empty-analysis {
  display: grid;
  min-height: 524px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
}

.empty-score {
  display: grid;
  width: 100px;
  height: 100px;
  place-items: center;
  margin-bottom: 8px;
  border: 10px solid #e6eaf1;
  border-radius: 50%;
  color: #9ba5b5;
  font-size: 28px;
  font-weight: 800;
}

.empty-analysis strong {
  color: #4d586b;
}

.empty-analysis span {
  font-size: 12px;
}

.analysis-result {
  display: grid;
  gap: 18px;
}

.score-row {
  justify-content: flex-start;
}

.score-badge {
  display: grid;
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  place-items: center;
  align-content: center;
  border: 8px solid #cfe0ff;
  border-radius: 50%;
  background: white;
}

.score-badge strong,
.score-badge span {
  display: block;
}

.score-badge strong {
  color: var(--blue);
  font-size: 24px;
}

.score-badge span {
  color: var(--muted);
  font-size: 10px;
}

.decision > span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 9px;
  border-radius: 5px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 800;
}

.decision > span.consider {
  color: var(--amber);
  background: var(--amber-soft);
}

.decision > span.skip {
  color: var(--red);
  background: var(--red-soft);
}

.decision p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.score-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
}

.score-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.score-item span {
  color: var(--muted);
}

.score-track {
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: #e8ecf2;
}

.score-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--blue);
  transition: width 320ms ease;
}

.score-item b {
  text-align: right;
  font-size: 11px;
}

.score-reasons {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.score-reasons > div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.score-reasons b {
  color: #334159;
  font-size: 11px;
}

.score-reasons span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

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

.insight-columns > div,
.risk-box,
.message-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

ul {
  margin: 9px 0 0;
  padding-left: 18px;
}

li {
  margin: 5px 0;
  color: #566175;
  font-size: 11px;
  line-height: 1.5;
}

li.empty-insight {
  color: #8a94a5;
  list-style: none;
}

.risk-box {
  border-color: #f1d4a9;
  background: #fffbf3;
}

.risk-box h3 {
  color: #9d5c13;
}

.message-block > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.message-block textarea {
  min-height: 84px;
  margin-top: 8px;
  border-color: transparent;
  background: var(--surface-soft);
}

.delivery-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid #e3e8ef;
}

.delivery-strip div span,
.delivery-strip div strong {
  display: block;
}

.delivery-strip div span {
  color: #2267e8;
  font-size: 11px;
  font-weight: 800;
}

.delivery-strip div strong {
  max-width: 360px;
  margin-top: 4px;
  overflow: hidden;
  color: #1c273b;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-strip > span {
  color: #7b8799;
  font-size: 11px;
}

.result-actions {
  justify-content: flex-start;
}

.queue-section {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.queue-heading {
  margin-bottom: 18px;
}

.queue-heading h2 {
  margin-top: 5px;
}

.queue-tools input {
  width: min(260px, 26vw);
}

.queue-empty {
  display: grid;
  min-height: 168px;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
}

.queue-empty strong {
  color: #4e596b;
}

.queue-empty span {
  font-size: 12px;
}

.queue-list {
  display: grid;
  gap: 8px;
}

.queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 90px 90px minmax(210px, auto);
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.queue-item:hover {
  border-color: #b9c7dc;
  background: #fbfcfe;
}

.job-identity {
  min-width: 0;
}

.job-identity strong,
.job-identity span {
  display: block;
}

.job-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-identity span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.queue-score {
  font-size: 12px;
}

.queue-score b {
  color: var(--blue);
  font-size: 20px;
}

.status-select {
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: white;
}

.queue-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.queue-actions button {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #465167;
  background: white;
  font-size: 11px;
  font-weight: 700;
}

.queue-actions button:hover {
  border-color: #9fb0c7;
  background: var(--surface-soft);
}

.drawer-shell {
  position: fixed;
  z-index: 30;
  inset: 0;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(11, 19, 32, 0.45);
}

.profile-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(560px, 100%);
  height: 100%;
  flex-direction: column;
  background: white;
  box-shadow: -24px 0 60px rgba(15, 27, 47, 0.18);
}

.drawer-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin-top: 5px;
}

.close-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: white;
  font-size: 23px;
}

.drawer-content {
  display: grid;
  gap: 18px;
  padding: 24px;
  overflow-y: auto;
}

.upload-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px 12px;
}

.upload-row > span {
  grid-column: 1 / -1;
}

.upload-row input {
  display: none;
}

.upload-row button {
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: white;
}

.resume-textarea {
  min-height: 260px;
}

.drawer-actions {
  margin-top: auto;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: white;
}

.drawer-actions .primary-button {
  width: 100%;
}

.toast {
  position: fixed;
  z-index: 60;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 14px;
  border-radius: 6px;
  color: white;
  background: #172033;
  box-shadow: 0 12px 28px rgba(15, 27, 47, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 180ms ease;
  font-size: 12px;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .job-input-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .analysis-panel {
    min-height: auto;
  }

  .empty-analysis {
    min-height: 300px;
  }

  .queue-item {
    grid-template-columns: minmax(0, 1fr) 82px 90px;
  }

  .queue-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

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

  .sidebar {
    position: static;
    display: block;
    height: auto;
    padding: 14px 16px;
  }

  .brand {
    margin-bottom: 12px;
  }

  .side-nav {
    grid-template-columns: 1fr 1fr;
  }

  .side-section,
  .manual-mode {
    display: none;
  }

  .workspace {
    padding: 20px 14px 40px;
  }

  .workspace-header,
  .queue-heading {
    align-items: flex-start;
  }

  .header-actions {
    display: grid;
    justify-items: stretch;
  }

  h1 {
    font-size: 24px;
  }

  .profile-alert {
    align-items: flex-start;
  }

  .analysis-grid,
  .queue-section {
    border-radius: 7px;
  }

  .job-input-panel,
  .analysis-panel,
  .queue-section {
    padding: 18px;
  }

  .field-row,
  .insight-columns,
  .score-bars {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .jd-field textarea {
    min-height: 210px;
  }

  .queue-heading,
  .queue-tools {
    display: grid;
    grid-template-columns: 1fr;
  }

  .queue-tools input {
    width: 100%;
  }

  .queue-item {
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 10px;
  }

  .status-select {
    grid-column: 1 / -1;
  }

  .profile-drawer {
    width: 100%;
  }
}
