:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #152033;
  --muted: #667085;
  --line: #d8dee9;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --warn: #b45309;
  --danger: #b91c1c;
  --good: #047857;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

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

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

.sidebar {
  background: #101828;
  color: #eef4ff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 112px;
  height: 28px;
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: 100%;
  height: auto;
  display: block;
}

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

.brand strong {
  color: #ffffff;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1.05;
}

.brand span:last-child {
  margin-top: 2px;
  color: #b7c4d8;
  font-size: 13px;
}

nav {
  display: grid;
  gap: 6px;
}

.nav-profile {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.nav-profile span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.nav-profile.active,
.nav-profile:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.26);
}

.nav-link {
  width: 100%;
  border: 0;
  color: #dbe7ff;
  background: transparent;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 86px;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-right,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-right {
  position: relative;
  min-width: 0;
}

.filter-menu {
  position: relative;
}

.filter-menu summary {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.filter-menu summary::-webkit-details-marker {
  display: none;
}

.filter-menu summary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-menu-panel {
  position: fixed;
  top: 74px;
  right: 76px;
  width: min(560px, calc(100vw - 376px));
  max-height: calc(100vh - 94px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  z-index: 40;
}

.filter-menu-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.filter-menu-title span {
  color: var(--muted);
  font-size: 12px;
}

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

h1 {
  font-size: 24px;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.content {
  padding: 24px 28px 36px;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.auth-mode .workspace {
  background:
    linear-gradient(90deg, rgba(4, 12, 24, 0.22), rgba(255, 255, 255, 0.08) 42%, rgba(4, 12, 24, 0.28)),
    url("/app/assets/brand/restart-recruting-ai-bg.png") center / cover no-repeat;
}

.auth-mode .topbar {
  border-bottom-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(140%);
}

.auth-mode .content {
  padding: 0;
  min-height: calc(100vh - 86px);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
}

.empty-state,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  min-width: 0;
}

.empty-state {
  max-width: 720px;
}

.empty-state p {
  margin-top: 8px;
  color: var(--muted);
}

.login-panel {
  min-height: calc(100vh - 86px);
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 28px 28px 8vh;
}

.login-card {
  width: min(420px, 100%);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 28px;
  display: grid;
  gap: 14px;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px) saturate(122%);
}

.login-card label,
.settings-form label,
.upload-form {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.login-card label {
  color: rgba(15, 23, 42, 0.78);
  font-weight: 700;
}

.login-card input {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.login-card .primary-button {
  background: rgba(37, 99, 235, 0.9);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="url"],
input[type="number"],
input[type="datetime-local"],
input[type="file"] {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px 10px;
  color: var(--ink);
}

.primary-button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  padding: 0 14px;
}

.secondary-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  padding: 0 12px;
}

#login-error {
  color: var(--danger);
  min-height: 18px;
}

.upload-form,
.settings-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.check-line {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: var(--ink) !important;
}

.result-box {
  margin-top: 10px;
  min-height: 42px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  white-space: pre-wrap;
}

.upload-status {
  min-height: 20px;
  margin-top: 8px;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  min-width: 0;
}

.metrics-grid.compact {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin: 16px 0;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 8px;
  min-width: 0;
  align-content: start;
}

.metric-action {
  width: 100%;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.metric-action:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.user-avatar {
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--accent-2);
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  font-weight: 900;
  letter-spacing: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-avatar-sm {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.user-avatar-md {
  width: 48px;
  height: 48px;
  font-size: 15px;
}

.user-avatar-lg {
  width: 86px;
  height: 86px;
  font-size: 26px;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-hero h2 {
  font-size: 26px;
}

.profile-hero p:last-child {
  margin-top: 4px;
  color: var(--muted);
}

.dashboard-report:empty {
  display: none;
}

.metric span,
.list-row span,
.timeline-item span,
.graph-node span,
.detail p {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  font-size: 26px;
  letter-spacing: 0;
  line-height: 1.15;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.metrics-grid.compact .metric strong {
  font-size: 18px;
  line-height: 1.25;
}

.metric.good strong,
.badge.good {
  color: var(--good);
}

.metric.warn strong,
.badge.warn {
  color: var(--warn);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.split.wide-left {
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.4fr);
}

.stacked-cards {
  display: grid;
  gap: 18px;
}

.card h2,
.card h3 {
  margin-bottom: 12px;
  font-size: 18px;
  letter-spacing: 0;
}

.card h3 {
  margin-top: 18px;
  font-size: 15px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  margin: 2px 3px 2px 0;
}

.avatar {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  border: 2px solid #ffffff;
  background: #e5edf5;
  box-shadow: 0 0 0 1px var(--line);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-sm {
  width: 42px;
  height: 42px;
}

.avatar-md {
  width: 56px;
  height: 56px;
}

.avatar-xl {
  width: 84px;
  height: 84px;
}

.person-cell,
.detail-person,
.kanban-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.person-cell > div,
.detail-person > div,
.kanban-card-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.person-cell strong,
.kanban-card-head strong {
  overflow-wrap: anywhere;
}

.person-cell span,
.kanban-card-head span {
  color: var(--muted);
  font-size: 12px;
}

.person-link {
  text-align: left;
}

.list {
  max-height: calc(100vh - 140px);
  overflow: auto;
}

.list-row {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 10px;
  text-align: left;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.list-row-main {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.list-row.active,
.list-row:hover {
  border-color: var(--line);
  background: #f8fafc;
}

.profile-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.profile-links-compact {
  margin-left: 52px;
}

.profile-links-detail {
  margin: 2px 0;
}

.profile-link {
  width: 30px;
  min-width: 30px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.profile-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-link {
  border-radius: 999px;
  font-size: 12px;
}

.contact-email {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #0b5af9;
}

.contact-telegram {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #0891b2;
}

.contact-phone {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.profile-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ai-summary-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0 10px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.ai-summary-card h3 {
  margin: 0 0 6px;
}

.ai-summary-card p {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.vacancy-ai-summary {
  margin: 0;
}

.vacancy-ai-summary .secondary-button {
  flex: 0 0 auto;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-head .detail-person {
  align-items: flex-start;
  width: 100%;
}

.detail-head .detail-person > div {
  flex: 1;
}

.candidate-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.candidate-title-row h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.candidate-title-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.candidate-title-actions .badge {
  margin: 0;
}

.candidate-title-actions .icon-action {
  flex: 0 0 32px;
}

.chips {
  margin-top: 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  padding: 0 14px;
}

.admin-tab.active,
.admin-tab:hover {
  border-color: var(--accent);
  background: #ecfdf5;
  color: var(--accent);
}

.admin-policy {
  background: #f8fafc;
}

.filter-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

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

.filter-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filter-grid input,
.filter-grid select {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 6px 8px;
}

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

.filter-panel-topbar {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.filter-panel-topbar .filter-grid {
  grid-template-columns: repeat(2, minmax(170px, 1fr));
}

.entity-head,
.action-buttons,
.quick-actions,
.kanban-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.entity-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.entity-head h2 {
  margin: 0;
}

.action-buttons {
  justify-content: flex-end;
}

.quick-actions {
  margin: 12px 0 4px;
}

.icon-action {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-weight: 900;
}

.icon-action:hover,
.secondary-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-action:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.icon-action:disabled:hover {
  border-color: var(--line);
  color: var(--muted);
}

.secondary-button.danger {
  border-color: #fecdd3;
  color: var(--danger);
  background: #fff1f2;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.46);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.modal-card header,
.modal-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rate-calculator-card {
  width: min(940px, 100%);
}

.resume-brand-card {
  width: min(760px, 100%);
}

.resume-brand-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.brand-choice-button {
  min-height: 168px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  grid-template-rows: 74px auto auto;
  gap: 8px;
  justify-items: center;
  padding: 14px 10px;
  text-align: center;
}

.brand-choice-button:hover {
  border-color: var(--accent);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.brand-choice-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.brand-choice-logo {
  width: 92px;
  height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  padding: 8px;
}

.brand-choice-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-choice-logo-restart {
  background: #0f172a;
  border-color: #0f172a;
}

.brand-choice-logo-clean span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.brand-choice-button strong,
.brand-choice-button small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.brand-choice-button small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.rate-calculator {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  gap: 16px;
  align-items: stretch;
}

.rate-controls,
.rate-results {
  display: grid;
  gap: 12px;
}

.range-field {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef2ff 0%, #ecfeff 100%);
}

.range-field span {
  color: var(--muted);
  font-size: 13px;
}

.range-field strong {
  font-size: 24px;
  line-height: 1.1;
}

.range-field input[type="range"] {
  width: 100%;
  accent-color: var(--accent-2);
}

.model-note {
  margin: 0;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.45;
}

.rate-hero {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: linear-gradient(135deg, #e0f2fe 0%, #dcfce7 100%);
  align-content: center;
}

.rate-hero span {
  color: #475569;
  font-size: 13px;
}

.rate-hero strong {
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: 0;
}

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

.rate-result-grid .metric {
  background: #ffffff;
}

.rate-error:empty {
  display: none;
}

.candidate-picker-modal {
  width: min(1180px, 100%);
  max-height: min(860px, calc(100vh - 32px));
  overflow: hidden;
}

.candidate-picker-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
}

.candidate-picker-filters,
.candidate-picker-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
  min-width: 0;
}

.candidate-picker-filters {
  align-self: start;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 170px);
  overflow: auto;
}

.candidate-picker-filters h3,
.candidate-picker-section h3 {
  margin: 0;
}

.candidate-picker-filter-grid {
  grid-template-columns: 1fr;
}

.picker-next-action {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.picker-next-action input,
.candidate-picker-section select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 6px 8px;
}

.candidate-picker-main {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-height: calc(100vh - 170px);
  overflow: auto;
  padding-right: 2px;
}

.candidate-picker-results,
.candidate-picker-ai-results {
  display: grid;
  gap: 10px;
}

.candidate-picker-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  min-width: 0;
}

.candidate-picker-card-main,
.candidate-picker-card-side {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.candidate-picker-card-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.candidate-picker-tags,
.candidate-picker-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.candidate-picker-card-side {
  justify-items: end;
}

.compact-match-list .match-card {
  box-shadow: none;
}

.compact-match-list .match-card-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-match-list .match-explanation {
  grid-column: 1 / -1;
}

.picker-openai-check {
  margin: 0;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

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

.modal-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

textarea {
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px 10px;
  color: var(--ink);
  resize: vertical;
}

select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0 10px;
}

select[multiple] {
  min-height: 180px;
  padding: 8px 10px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent-2);
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.vacancy-open-link {
  display: grid;
  gap: 2px;
  max-width: 240px;
}

.vacancy-open-link span {
  color: var(--muted);
  font-size: 12px;
}

.vacancies-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
  gap: 18px;
  align-items: start;
}

.vacancies-list-panel,
.vacancy-ai-panel {
  min-width: 0;
}

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

.vacancy-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  min-width: 0;
}

.vacancy-list-row.active {
  border-color: rgba(37, 99, 235, 0.42);
  background: #f3f7ff;
  box-shadow: inset 3px 0 0 var(--accent-2);
}

.vacancy-list-row:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: #f8fbff;
}

.vacancy-list-main {
  border: 0;
  background: transparent;
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.vacancy-list-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.vacancy-list-title strong,
.vacancy-list-title span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.vacancy-list-title span {
  color: var(--muted);
  font-size: 13px;
}

.vacancy-list-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.vacancy-overview-summary {
  margin-top: 12px;
}

.vacancy-ai-facts {
  display: grid;
  gap: 0;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.vacancy-ai-facts div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.vacancy-ai-facts div:last-child {
  border-bottom: 0;
}

.vacancy-ai-facts dt,
.vacancy-ai-facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.vacancy-ai-facts dt {
  color: var(--muted);
  font-size: 13px;
}

.vacancy-ai-facts dd {
  color: var(--ink);
  font-weight: 700;
}

.vacancy-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: min(100%, 1160px);
  justify-self: start;
}

.vacancy-workspace-head > .action-buttons {
  flex: 1 1 620px;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-start;
}

.vacancy-workspace-head > .secondary-button {
  flex: 0 0 auto;
}

.vacancy-workspace-head .primary-button,
.vacancy-workspace-head .secondary-button {
  white-space: nowrap;
}

.vacancy-hero {
  width: min(100%, 1160px);
  justify-self: start;
  display: grid;
  gap: 14px;
  align-content: start;
}

.vacancy-hero .metrics-grid.compact {
  margin: 4px 0;
  gap: 10px;
}

.vacancy-hero .metric {
  padding: 12px;
}

.vacancy-title-block {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.vacancy-title-block h2 {
  margin: 4px 0 6px;
  overflow-wrap: anywhere;
}

.vacancy-title-block p {
  color: var(--muted);
}

.vacancy-description {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vacancy-description div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}

.vacancy-description strong {
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}

.vacancy-description p {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.match-card-list {
  display: grid;
  gap: 12px;
}

.match-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  min-width: 0;
}

.match-card header,
.match-card footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.match-card footer {
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.match-card footer > span {
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.match-score-total {
  display: grid;
  justify-items: end;
  gap: 2px;
  flex: 0 0 auto;
}

.match-score-total strong {
  font-size: 30px;
  line-height: 1;
}

.match-score-total span {
  color: var(--muted);
  font-size: 12px;
}

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

.match-score-line {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
}

.match-score-line strong {
  color: var(--ink);
}

.match-score-line::after,
.match-score-line i {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
}

.match-score-line i {
  right: auto;
  max-width: 100%;
  background: #60a5fa;
}

.match-card-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.match-card-body > div {
  min-width: 0;
}

.match-explanation {
  grid-column: 1 / -1;
}

.match-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.match-card p {
  margin: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.compact-empty {
  padding: 16px;
}

.stage-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(178px, 1fr);
  gap: 10px;
  overflow: auto;
  padding-bottom: 4px;
  min-width: 0;
  max-width: 100%;
}

.stage-tile {
  --kanban-bg: #eef6ff;
  --kanban-accent: #5b8def;
  appearance: none;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  min-height: 108px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: space-between;
  gap: 8px;
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-left: 4px solid var(--kanban-accent);
  border-radius: 8px;
  background: var(--kanban-bg);
  padding: 12px;
}

.stage-tile:hover {
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.stage-tile div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.stage-tile strong {
  overflow-wrap: anywhere;
}

.stage-tile span,
.stage-tile small {
  color: var(--muted);
  font-size: 12px;
}

.stage-tile b {
  color: var(--kanban-accent);
  font-size: 26px;
  line-height: 1;
}

.stage-tile small {
  grid-column: 1 / -1;
}

.vacancy-detail-grid {
  align-items: start;
}

.vacancy-side-column {
  display: grid;
  gap: 18px;
}

.vacancy-pipeline-panel {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.pipeline-stage-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(270px, 24vw, 330px);
  gap: 12px;
  overflow: auto;
  padding: 2px 2px 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  scroll-snap-type: x proximity;
}

.vacancy-lower-grid {
  width: min(100%, 1160px);
  justify-self: start;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: start;
}

.vacancy-lower-grid .card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.vacancy-lower-grid .table-wrap {
  max-height: clamp(260px, 38vh, 420px);
  overflow: auto;
}

.pipeline-stage-column {
  --kanban-bg: #eef6ff;
  --kanban-accent: #5b8def;
  min-width: 0;
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-radius: 8px;
  background: var(--kanban-bg);
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 10px;
  scroll-margin-top: 104px;
  scroll-snap-align: start;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pipeline-stage-column.stage-column-focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kanban-accent) 28%, transparent), 0 16px 34px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.pipeline-stage-column header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pipeline-stage-column header div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pipeline-stage-column header strong {
  overflow-wrap: anywhere;
}

.pipeline-stage-column header span {
  color: var(--muted);
  font-size: 12px;
}

.pipeline-candidate-card {
  background: var(--panel);
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-left: 4px solid var(--kanban-accent);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 9px;
  min-width: 0;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.pipeline-candidate-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.stage-move-panel {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 7px;
}

.stage-move-panel label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stage-move-panel label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stage-move-panel select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
}

.stage-move-button {
  width: 100%;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--kanban-accent) 32%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--kanban-accent) 11%, #ffffff);
  color: var(--kanban-accent);
  cursor: pointer;
  font-weight: 900;
}

.stage-move-button:hover {
  background: color-mix(in srgb, var(--kanban-accent) 18%, #ffffff);
}

.kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(292px, 1fr);
  gap: 14px;
  overflow: auto;
  padding: 2px 2px 10px;
}

.kanban-column {
  min-height: 360px;
  --kanban-bg: #eef6ff;
  --kanban-accent: #5b8def;
  --kanban-card-bg: #ffffff;
  background: var(--kanban-bg);
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-radius: 8px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.kanban-sourcing {
  --kanban-bg: #e9fbf3;
  --kanban-accent: #10b981;
}

.kanban-screening {
  --kanban-bg: #eaf6ff;
  --kanban-accent: #38bdf8;
}

.kanban-client-review {
  --kanban-bg: #f2efff;
  --kanban-accent: #8b5cf6;
}

.kanban-interview {
  --kanban-bg: #fff1e8;
  --kanban-accent: #fb923c;
}

.kanban-offer {
  --kanban-bg: #fff8db;
  --kanban-accent: #eab308;
}

.kanban-hire {
  --kanban-bg: #ecfdf5;
  --kanban-accent: #059669;
}

.kanban-reject {
  --kanban-bg: #fff1f2;
  --kanban-accent: #f43f5e;
}

.kanban-hold,
.kanban-default {
  --kanban-bg: #f4f7fb;
  --kanban-accent: #64748b;
}

.kanban-vacancy,
.kanban-client {
  --kanban-bg: #eef2ff;
  --kanban-accent: #6366f1;
}

.kanban-recruiter {
  --kanban-bg: #fdf2f8;
  --kanban-accent: #ec4899;
}

.kanban-source {
  --kanban-bg: #ecfeff;
  --kanban-accent: #06b6d4;
}

.kanban-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}

.kanban-column header div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.kanban-column header strong {
  overflow-wrap: anywhere;
}

.kanban-column header small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.kanban-column header > span {
  min-width: 30px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--kanban-accent);
  font-size: 12px;
  font-weight: 900;
}

.kanban-card {
  background: var(--kanban-card-bg);
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-left: 4px solid var(--kanban-accent);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  cursor: grab;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.kanban-card[draggable="false"] {
  cursor: default;
}

.kanban-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.kanban-candidate-link {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.kanban-candidate-link > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.kanban-candidate-link strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.kanban-candidate-link em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.kanban-candidate-link:hover strong {
  color: var(--accent);
}

.kanban-card-tools {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 28px);
  gap: 6px;
  max-width: 100%;
}

.kanban-card-tools .icon-action {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: #f8fafc;
  font-size: 11px;
  line-height: 1;
  overflow: hidden;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
}

.kanban-next-action {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f8fafc;
  background: color-mix(in srgb, var(--kanban-accent) 9%, #ffffff);
}

.kanban-next-action span {
  color: var(--kanban-accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.kanban-next-action strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.kanban-card-actions {
  display: block;
  width: 100%;
  min-width: 0;
}

.kanban-card-actions select {
  min-width: 0;
  width: 100%;
}

.kanban-card-actions .badge {
  min-width: 0;
  justify-content: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.kanban-card span {
  color: var(--muted);
  font-size: 13px;
}

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

.timeline.compact {
  gap: 6px;
}

.timeline.compact .timeline-item {
  padding-top: 6px;
  padding-bottom: 6px;
}

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

.timeline-item p {
  color: var(--muted);
  margin-top: 4px;
}

.movement-list {
  display: grid;
  gap: 12px;
}

.movement-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.movement-card > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.movement-card span {
  color: var(--muted);
  font-size: 13px;
}

.movement-vacancies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.movement-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 0 9px;
  overflow-wrap: anywhere;
}

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

.graph-node {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 6px;
}

.graph-node.center {
  border-color: var(--accent);
  background: #ecfdf5;
}

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

  .sidebar {
    position: static;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .filter-menu-panel {
    top: 112px;
    right: 28px;
    left: 28px;
    width: calc(100vw - 56px);
    max-height: calc(100vh - 132px);
  }

  .filter-panel-topbar .filter-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid,
  .metrics-grid.compact,
  .split,
  .split.wide-left,
  .vacancies-overview-grid,
  .resume-brand-grid,
  .rate-calculator,
  .rate-result-grid,
  .profile-grid,
  .candidate-picker-layout,
  .candidate-picker-card,
  .compact-match-list .match-card-body {
    grid-template-columns: 1fr;
  }

  .candidate-picker-modal {
    overflow: auto;
  }

  .candidate-picker-filters,
  .candidate-picker-main {
    max-height: none;
  }

  .candidate-picker-card-side {
    justify-items: stretch;
  }

  .candidate-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .candidate-title-actions {
    justify-content: flex-start;
    margin-left: 0;
  }

  .vacancy-title-block,
  .vacancy-workspace-head {
    align-items: stretch;
    flex-direction: column;
  }

  .vacancy-description {
    grid-template-columns: 1fr;
  }

  .match-card header,
  .match-card footer {
    align-items: stretch;
    flex-direction: column;
  }

  .match-score-total {
    justify-items: start;
  }

  .match-score-grid,
  .match-card-body {
    grid-template-columns: 1fr;
  }

  .vacancy-workspace-head > .action-buttons {
    flex: 0 1 auto;
  }

  .stage-strip {
    grid-auto-columns: minmax(160px, 78vw);
  }

  .vacancy-list-row {
    grid-template-columns: 1fr;
  }

  .vacancy-list-row > .action-buttons {
    justify-content: flex-start;
  }
}
