:root {
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--slate-50);
  color: var(--slate-900);
  font-size: 20px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  align-self: flex-start;
  position: sticky; top: 0; height: 100vh;
  width: 250px; flex-shrink: 0; border-right: 1px solid var(--slate-200);
  background: #fff; display: flex; flex-direction: column; padding: 12px 10px;
  overflow-y: auto; overflow-x: hidden;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar,
.nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 10px; cursor: pointer; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand-600);
  color: #fff; font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; letter-spacing: -.5px;
  flex-shrink: 0;
}
.brand-text { font-weight: 800; font-size: 15px; line-height: 1.15; color: var(--slate-900); }
.nav {
  display: flex; flex-direction: column; gap: 2px; margin-top: 2px; flex: 1;
  overflow-y: auto; overflow-x: hidden; margin-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-section-title {
  padding: 5px 8px 2px;
  font-size: 10px;
  font-weight: 800;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px;
  color: var(--slate-700); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--slate-100); color: var(--slate-900); }

.nav-item.active {
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 700;
}
.nav-item.active .nav-ico {
  color: var(--brand-600);
  opacity: 1;
}

.nav-ico { width: 18px; text-align: center; font-size: 15px; opacity: .85; flex-shrink: 0; }
.nav-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.nav-title {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-subtitle {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--slate-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.nav-item:hover .nav-subtitle {
  color: var(--slate-500);
}
.nav-item.active .nav-subtitle {
  color: var(--brand-600);
  opacity: 0.85;
}
.sidebar-foot {
  margin-top: auto; padding: 8px 2px 2px; border-top: 1px solid var(--slate-200);
  display: flex; flex-direction: column; gap: 4px;
}

/* Main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--slate-50); }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-bottom: 1px solid var(--slate-200); background: #fff;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.ai-engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 1px 2px rgba(22, 101, 52, 0.06);
}
.ai-engine-badge:hover {
  background: #dcfce7;
  border-color: #86efac;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(22, 101, 52, 0.12);
}
.ai-engine-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #22c55e;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: ai-pulse 2s infinite;
}
.ai-engine-badge.warning .ai-engine-status-dot {
  background-color: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
}
.ai-engine-badge.warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.ai-engine-badge.mock .ai-engine-status-dot {
  background-color: #94a3b8;
  animation: none;
}
.ai-engine-badge.mock {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}
@keyframes ai-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.ai-engine-icon { font-size: 14px; line-height: 1; }
.ai-engine-text { display: flex; align-items: center; gap: 6px; }
.ai-engine-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: #14532d;
  letter-spacing: -0.2px;
}
.ai-engine-badge.warning .ai-engine-name { color: #92400e; }
.ai-engine-badge.mock .ai-engine-name { color: #475569; }
.ai-engine-key {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: #dcfce7;
  color: #15803d;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #86efac;
  letter-spacing: 0.3px;
}
.ai-engine-badge.warning .ai-engine-key { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.ai-engine-badge.mock .ai-engine-key { background: #e2e8f0; color: #475569; border-color: #cbd5e1; }
.demo-badge {
  font-size: 15px; font-weight: 700; color: var(--brand-700);
  background: var(--brand-50); border: 1px solid var(--brand-100); padding: 5px 12px; border-radius: 999px;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-hint { font-size: 16px; font-weight: 600; color: var(--slate-600); }

/* User auth badge in topbar */
.user-auth-badge {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  background: var(--slate-100);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.user-auth-badge:hover {
  background: var(--slate-200);
  border-color: var(--slate-300);
  color: var(--slate-900);
}
.user-auth-badge:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
}
.user-auth-role {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-200, #c7d2fe);
  padding: 1px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* User account badge in sidebar foot */
.user-account-badge {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  font-size: 13px;
  transition: background 0.15s;
}
.user-account-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  min-width: 0;
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 4px;
  transition: background 0.15s;
  user-select: none;
}
.user-account-info:hover {
  background: var(--slate-100);
}
.user-account-info:focus-visible {
  outline: 2px solid var(--brand-600);
}

.mobile-nav { display: none; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--slate-200); background: #fff; overflow-x: auto; }
.mobile-nav .nav-item { white-space: nowrap; padding: 10px 14px; font-size: 17px; }

.view { flex: 1; padding: 28px 24px; width: 100%; }

/* Cards / generic */
.card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
h1 { font-size: 36px; font-weight: 800; margin: 0 0 10px; color: var(--slate-900); }
h2 { font-size: 30px; font-weight: 800; margin: 0 0 16px; color: var(--slate-900); }
h3 { font-size: 26px; font-weight: 800; margin: 0 0 12px; color: var(--slate-900); }
h4 { font-size: 22px; font-weight: 800; margin: 0 0 10px; color: var(--slate-900); }
.sub { color: var(--slate-600); font-size: 20px; margin: 0 0 24px; line-height: 1.65; }
.btn-primary { background: var(--brand-600); color: #fff; border: none; padding: 16px 28px; border-radius: 12px; font-weight: 700; font-size: 20px; cursor: pointer; }
.btn-primary:hover { background: var(--brand-700); }
.btn-ghost { background: #fff; color: var(--slate-800); border: 1px solid var(--slate-300); padding: 16px 24px; border-radius: 12px; font-weight: 700; font-size: 20px; cursor: pointer; }
.btn-ghost:hover { border-color: var(--brand-300, #c7d2fe); color: var(--brand-700); }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* Dashboard / position cards */
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; margin-top: 12px; }
.pos-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 26px; cursor: pointer; transition: .15s; box-shadow: var(--shadow); }
.pos-card:hover { border-color: #c7d2fe; box-shadow: 0 10px 30px rgba(79,70,229,.12); transform: translateY(-2px); }
.pos-card h3 { margin: 0 0 10px; font-size: 24px; font-weight: 800; line-height: 1.3; overflow-wrap: break-word; }
.pos-card p { margin: 0 0 16px; font-size: 18px; color: var(--slate-600); line-height: 1.6; overflow-wrap: break-word; }
.tag { display: inline-block; font-size: 16px; font-weight: 700; color: var(--brand-700); background: var(--brand-50); padding: 5px 12px; border-radius: 8px; margin: 0 6px 6px 0; }

/* Selectors */
.field-label { font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--slate-600); margin: 24px 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { border: 1px solid var(--slate-300); background: #fff; color: var(--slate-800); padding: 11px 18px; border-radius: 12px; font-weight: 700; font-size: 17px; cursor: pointer; }
.chip.active { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-700); }
.chip.check.active { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }

/* Brief */
.brief-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; margin: 18px 0; }
.brief-meta .item { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 12px; padding: 14px 16px; }
.brief-meta .k { font-size: 14px; font-weight: 800; text-transform: uppercase; color: var(--slate-600); }
.brief-meta .v { font-size: 18px; font-weight: 600; color: var(--slate-900); margin-top: 4px; }

/* Chat */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 180px); min-height: 420px; }
.chat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.chat-head h2 { margin: 0; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 6px 4px; }
.msg { max-width: 78%; padding: 12px 15px; border-radius: 14px; font-size: 16px; line-height: 1.55; }
.msg .who { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; opacity: .7; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--slate-200); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--brand-600); color: #fff; border-bottom-right-radius: 4px; }
.msg.user .who { opacity: .85; }
.composer { display: flex; gap: 10px; margin-top: 12px; }
.composer textarea { flex: 1; resize: none; height: 54px; padding: 12px 14px; border: 1px solid var(--slate-200); border-radius: 12px; font: inherit; font-size: 16px; }
.composer textarea:focus { outline: none; border-color: var(--brand-600); }

/* Голосовой режим тренажёра (views/trainer/live-voice.js) */
.btn-voice { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 12px; border: 1px solid var(--slate-200); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.btn-voice:hover { border-color: var(--brand-600); }
.btn-voice.is-live { background: #dc2626; border-color: #b91c1c; color: #fff; animation: voice-pulse 1.6s ease-in-out infinite; }
.btn-voice-wide { border-radius: 10px; border: 1px solid var(--brand-600); background: #fff; color: var(--brand-600); font: inherit; font-weight: 700; padding: 12px 20px; cursor: pointer; }
.btn-voice-wide:hover { background: var(--brand-600); color: #fff; }
@keyframes voice-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .5); } 50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); } }
.voice-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 9px 14px; border-radius: 10px; background: var(--slate-50, #f8fafc); border: 1px solid var(--slate-200); font-size: 13px; color: var(--slate-700); }
.voice-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--slate-400, #94a3b8); flex: 0 0 auto; }
.voice-dot.is-connecting { background: #f59e0b; animation: voice-pulse 1.6s ease-in-out infinite; }
.voice-dot.is-listening { background: #16a34a; }
.voice-dot.is-thinking { background: #f59e0b; animation: voice-pulse 1.6s ease-in-out infinite; }
.voice-dot.is-speaking { background: var(--brand-600); animation: voice-pulse 1.6s ease-in-out infinite; }
.voice-status { font-weight: 700; }
.voice-level { flex: 0 1 140px; height: 6px; border-radius: 3px; background: var(--slate-200); overflow: hidden; }
.voice-level > span { display: block; height: 100%; width: 0; background: #16a34a; transition: width .08s linear; }
.voice-hint { color: var(--slate-500); margin-left: auto; }
.msg-edit { margin-top: 8px; border: 1px solid rgba(255, 255, 255, .55); background: transparent; color: inherit; border-radius: 8px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; opacity: .85; }
.msg-edit:hover { opacity: 1; background: rgba(255, 255, 255, .18); }
.msg-edit-input { width: 100%; min-width: 260px; box-sizing: border-box; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .6); padding: 8px 10px; font: inherit; font-size: 15px; color: var(--slate-900); background: #fff; resize: vertical; }
.msg-edit-actions { display: flex; gap: 8px; margin-top: 8px; }
.msg-edit-actions .btn-primary, .msg-edit-actions .btn-ghost { padding: 5px 12px; font-size: 13px; }

/* Report */
.score-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.score-ring { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-direction: column; background: conic-gradient(var(--brand-600) calc(var(--p)*1%), var(--slate-200) 0); }
.score-ring .num { font-size: 32px; font-weight: 800; }
.score-ring .den { font-size: 14px; color: var(--slate-500); }
.pill { font-size: 14px; font-weight: 800; padding: 5px 12px; border-radius: 999px; }
.pill.yes { background: #dcfce7; color: var(--green); }
.pill.no { background: #fee2e2; color: var(--red); }
.section { margin-top: 22px; }
.section h3 { font-size: 17px; font-weight: 800; margin: 0 0 10px; }
.bullets { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.bullets li { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 10px; padding: 10px 14px; font-size: 16px; line-height: 1.5; }
.bullets li::before { content: "•"; color: var(--brand-600); font-weight: 800; margin-right: 8px; }
.crit { margin: 14px 0; }
.crit .top { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.crit .bar { height: 9px; background: var(--slate-200); border-radius: 999px; overflow: hidden; }
.crit .fill { height: 100%; border-radius: 999px; background: var(--brand-600); }
.crit .comment { font-size: 14.5px; color: var(--slate-500); margin-top: 5px; }
.better { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 10px; padding: 12px 14px; font-size: 15.5px; line-height: 1.55; margin-bottom: 10px; }
.muted { color: var(--slate-500); font-size: 15px; }

/* Loading */
.spinner { width: 18px; height: 18px; border: 2px solid var(--slate-300); border-top-color: var(--brand-600); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* History (saved sessions) */
.session-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.session-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid var(--slate-200); border-radius: 12px; padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow); }
.session-card:hover { border-color: #c7d2fe; }
.sc-main { flex: 1 1 auto; min-width: 0; writing-mode: horizontal-tb; }
.sc-title { font-weight: 800; font-size: 17px; writing-mode: horizontal-tb; overflow-wrap: break-word; }
.sc-meta { font-size: 14.5px; color: var(--slate-500); margin-top: 3px; writing-mode: horizontal-tb; overflow-wrap: break-word; }
.sc-score { width: 54px; height: 54px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; background: var(--slate-100); color: var(--slate-700); flex-shrink: 0; writing-mode: horizontal-tb; white-space: nowrap; line-height: 1; }
.sc-score.good { background: #dcfce7; color: var(--green); }
.sc-score.mid { background: #fef3c7; color: var(--amber); }
.sc-score.low { background: #fee2e2; color: var(--red); }
.empty-note { background: #fff; border: 1px dashed var(--slate-300); border-radius: 12px; padding: 24px; color: var(--slate-500); font-size: 16px; line-height: 1.5; text-align: center; }

/* Team (demo) */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 10px; }
.team-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--slate-200); border-radius: 14px; padding: 20px; cursor: pointer; box-shadow: var(--shadow); }
.team-card:hover { border-color: #c7d2fe; }
.team-avatar { width: 54px; height: 54px; border-radius: 12px; background: var(--brand-600); color: #fff; font-weight: 800; font-size: 20px; line-height: 1; letter-spacing: .5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; writing-mode: horizontal-tb; }
.team-info { flex: 1 1 200px; min-width: 0; writing-mode: horizontal-tb; }
.team-name { font-weight: 800; font-size: 20px; line-height: 1.3; writing-mode: horizontal-tb; white-space: normal; overflow-wrap: normal; }
.team-role { font-size: 16px; line-height: 1.35; color: var(--slate-500); margin-top: 3px; writing-mode: horizontal-tb; white-space: normal; overflow-wrap: normal; }
.team-stats { display: flex; gap: 20px; flex: 1 1 100%; justify-content: space-between; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--slate-100); writing-mode: horizontal-tb; }
.team-stat { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; writing-mode: horizontal-tb; }
.team-stat b { font-size: 20px; line-height: 1.15; font-weight: 800; writing-mode: horizontal-tb; }
.team-stat span { font-size: 13px; color: var(--slate-500); text-transform: uppercase; letter-spacing: .3px; line-height: 1.25; margin-top: 2px; writing-mode: horizontal-tb; }
.sc.good { color: var(--green); }
.sc.mid { color: var(--amber); }
.sc.low { color: var(--red); }

/* Danger button */
.btn-ghost.danger { color: var(--red); border-color: #fecaca; }
.btn-ghost.danger:hover { background: #fef2f2; color: #b91c1c; }

/* Resume → test → plan */
.hh-search-row { display: flex; align-items: stretch; gap: 12px; }
.hh-query {
  flex: 1; min-width: 0; border: 1px solid var(--slate-300); border-radius: 12px;
  padding: 14px 16px; font: inherit; font-size: 18px; color: var(--slate-900); background: #fff;
}
.hh-query:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.market-summary {
  margin-top: 16px; padding: 16px; border: 1px solid var(--brand-100); border-radius: 14px;
  background: var(--brand-50); font-size: 17px; line-height: 1.55;
}
.market-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.market-chip {
  display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--brand-100); color: var(--slate-700); font-size: 16px;
}
.market-mode, .market-vacancy {
  display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--slate-200);
  border-radius: 12px; background: #fff; padding: 14px 16px; cursor: pointer;
}
.market-mode:hover, .market-vacancy:hover { border-color: #c7d2fe; background: var(--slate-50); }
.market-mode.selected, .market-vacancy.selected { border-color: var(--brand-600); background: var(--brand-50); }
.market-mode input, .market-vacancy input { margin-top: 4px; accent-color: var(--brand-600); flex-shrink: 0; }
.market-mode span, .market-vacancy span { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.market-mode small, .market-vacancy small { color: var(--slate-600); font-size: 16px; line-height: 1.4; }
.market-vacancy em { color: var(--slate-700); font-size: 15px; font-style: normal; line-height: 1.4; }
.market-vacancy > a { color: var(--brand-600); font-weight: 800; text-decoration: none; padding: 0 4px; }
.market-vacancies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.market-error {
  display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding: 14px 16px;
  border: 1px solid #fecaca; border-radius: 12px; background: #fef2f2; color: #991b1b; font-size: 17px;
}
.market-error small { line-height: 1.45; overflow-wrap: anywhere; font-size: 15.5px; }
.resume-area {
  width: 100%; min-height: 140px; resize: vertical; border: 1px solid var(--slate-300);
  border-radius: 12px; padding: 14px 16px; font: inherit; font-size: 18px; line-height: 1.6;
  color: var(--slate-900); background: #fff;
}
.resume-area:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.resume-saved-note {
  background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 12px;
  padding: 12px 16px; font-size: 17px; color: var(--slate-800); line-height: 1.55; margin-bottom: 12px;
}
.resume-comp-list { display: flex; flex-direction: column; gap: 14px; }
.resume-comp {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow);
}
.resume-comp-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.resume-comp-name { font-weight: 800; font-size: 19px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lvlbar { height: 8px; border-radius: 99px; background: var(--slate-100); overflow: hidden; }
.lvlbar .fill { height: 100%; background: var(--brand-500, #6366f1); border-radius: 99px; }
.test-list { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.test-q {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 14px; padding: 20px; box-shadow: var(--shadow);
}
.test-q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.test-q-n {
  width: 32px; height: 32px; border-radius: 10px; background: var(--brand-600); color: #fff;
  font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.test-q-text { font-weight: 700; font-size: 19px; line-height: 1.5; margin-bottom: 14px; }
.test-opts { display: flex; flex-direction: column; gap: 10px; }
.test-opt {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--slate-200);
  border-radius: 12px; cursor: pointer; font-size: 17px; line-height: 1.5;
}
.test-opt:hover { border-color: #c7d2fe; background: var(--slate-50); }
.test-opt input { margin-top: 4px; accent-color: var(--brand-600); flex-shrink: 0; }
.plan-lessons { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 0; list-style: none; padding: 0; }
.plan-lesson {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid var(--slate-200); border-radius: 12px; padding: 12px 14px; background: var(--slate-50);
}
.plan-lesson-name { font-weight: 700; font-size: 17px; line-height: 1.4; }
.plan-lesson-link { font-size: 16px; padding: 10px 14px; white-space: nowrap; }

/* ---------------- vacancy applications ---------------- */
.application-auth { display: flex; align-items: center; gap: 12px; color: var(--slate-700); }
.application-auth h2 { margin: 0 0 8px; font-size: 22px; }
.application-auth code, .application-command { background: #0f172a; color: #e2e8f0; padding: 3px 8px; border-radius: 6px; font-size: 16px; }
.application-command { display: block; padding: 14px 16px; margin: 12px 0; white-space: pre-wrap; }
.application-auth-ok {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; flex-wrap: wrap;
}
.application-auth-ok span { font-size: 16px; color: var(--slate-600); }
.application-auth-ok b { font-size: 18px; color: var(--slate-900); }
.application-search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.application-search-row .hh-query { flex: 1; min-width: 240px; }
.application-search-row select {
  border: 1px solid var(--slate-300); border-radius: 12px; padding: 0 14px; font: inherit;
  font-size: 17px; background: #fff; color: var(--slate-800);
}
.application-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 12px;
  padding: 12px 16px; margin: 20px 0 14px; font-size: 17px; color: var(--slate-800);
}
.application-list { display: flex; flex-direction: column; gap: 14px; }
.application-card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 14px; padding: 16px 18px;
  box-shadow: var(--shadow);
}
.application-card.disabled { opacity: 0.55; }
.application-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.application-card-head label { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.application-card-head input { margin-top: 4px; accent-color: var(--brand-600); flex-shrink: 0; }
.application-card-head span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.application-card-head b { font-size: 19px; line-height: 1.4; }
.application-card-head small { color: var(--slate-600); font-size: 16px; }
.application-card-head > a { color: var(--brand-600); font-weight: 800; font-size: 16px; text-decoration: none; white-space: nowrap; }
.application-reason {
  margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 16px; line-height: 1.45;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
}
.application-success {
  margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 16px; line-height: 1.45;
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46;
}
.application-match {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 14px; background: var(--slate-50); border: 1px solid var(--slate-200);
  border-radius: 12px;
}
.application-match div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.application-match span { font-size: 15px; color: var(--slate-600); }
.application-match b { font-size: 18px; line-height: 1.4; }
.application-match strong { color: var(--brand-700); font-size: 18px; white-space: nowrap; }
.application-match > a { color: var(--brand-600); font-size: 16px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.fit-preview { margin-top: 14px; border: 1px solid var(--slate-200); border-radius: 12px; padding: 16px; }
.fit-score-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fit-score-head > div { display: flex; flex-direction: column; gap: 3px; }
.fit-score-head span { color: var(--slate-600); font-size: 15px; }
.fit-score-head b { font-size: 26px; color: var(--slate-800); }
.fit-score-projected { text-align: right; }
.fit-score-projected b { color: #047857; }
.fit-score-projected small { font-size: 16px; color: #059669; }
.fit-score-track { position: relative; height: 10px; margin: 10px 0 14px; background: var(--slate-100); border-radius: 99px; overflow: hidden; }
.fit-score-track span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; }
.ai-provider-control { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(190px, 1.2fr); gap: 10px; margin-top: 14px; }
.ai-provider-control label { display: flex; flex-direction: column; gap: 5px; }
.ai-provider-control label > span { color: var(--slate-600); font-size: 14px; font-weight: 800; }
.ai-provider-control select { height: 46px; border: 1px solid var(--slate-300); border-radius: 12px; padding: 0 12px; background: #fff; color: var(--slate-900); font: inherit; font-size: 16px; }
.ai-adapt-resume { align-self: end; min-height: 46px; }
.ai-adaptation-host { margin-top: 14px; }
.ai-adaptation-result { border: 1px solid var(--brand-100); border-radius: 12px; padding: 16px; background: #fbfcff; font-size: 16.5px; }
.ai-adaptation-result section { margin-top: 16px; }
.ai-adaptation-result h4 { margin: 0 0 8px; font-size: 18px; }
.ai-adaptation-result ul, .ai-adaptation-result ol { margin: 8px 0; padding-left: 22px; line-height: 1.6; }
.ai-adaptation-head { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; }
.ai-adaptation-head > div { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 10px; background: #fff; border: 1px solid var(--slate-200); }
.ai-adaptation-head span { color: var(--slate-600); font-size: 14px; }
.ai-adaptation-head b { color: var(--slate-900); font-size: 26px; }
.ai-adaptation-head div:nth-child(2) b { color: #047857; }
.ai-adaptation-head small { font-size: 15px; color: #059669; }
.ai-adaptation-head em { grid-column: 1 / -1; color: var(--slate-500); font-size: 14px; font-style: normal; }
.adapted-resume-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.adapted-resume-title .btn-ghost { padding: 8px 12px; font-size: 15px; }
.adapted-resume-text { min-height: 380px; background: #fff; font-size: 17px; line-height: 1.6; }
.adaptation-gaps { padding: 12px; border: 1px solid #fed7aa; border-radius: 10px; background: #fff7ed; }
.adaptation-mapping { margin-top: 16px; }
.adaptation-mapping summary { cursor: pointer; color: var(--brand-700); font-weight: 800; font-size: 17px; }
.adaptation-mapping > div { max-height: 380px; overflow-y: auto; margin-top: 10px; border: 1px solid var(--slate-200); border-radius: 10px; }
.adaptation-mapping-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border-bottom: 1px solid var(--slate-100); background: #fff; font-size: 16px; }
.adaptation-mapping-row:last-child { border-bottom: 0; }
.adaptation-mapping-row > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.adaptation-mapping-row span, .adaptation-mapping-row small { color: var(--slate-600); line-height: 1.45; }
.adaptation-mapping-row strong { flex-shrink: 0; font-size: 14.5px; }
.adaptation-mapping-row.matched strong { color: #047857; }
.adaptation-mapping-row.partial strong { color: #b45309; }
.adaptation-mapping-row.missing strong { color: #b91c1c; }
.adaptation-warning { padding: 12px; border: 1px solid #fde68a; border-radius: 10px; background: #fffbeb; color: #92400e; }
.fit-score-after { background: #a7f3d0; }
.fit-score-current { background: var(--brand-600); }
.fit-advice { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 10px 12px; font-size: 16px; margin-bottom: 12px; }
.fit-skill-block { margin-top: 12px; }
.fit-skill-block > span { display: block; color: var(--slate-600); font-size: 15px; margin-bottom: 6px; }
.tag.fit-present { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.tag.fit-missing { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.fit-recommendations { margin-top: 14px; }
.fit-recommendation { border-left: 4px solid var(--slate-300); padding: 8px 12px; margin-top: 8px; background: var(--slate-50); border-radius: 0 10px 10px 0; }
.fit-recommendation.high { border-left-color: #f59e0b; }
.fit-recommendation b { display: block; font-size: 16px; color: var(--slate-800); margin-bottom: 3px; }
.fit-recommendation p { margin: 0; color: var(--slate-700); font-size: 16px; line-height: 1.5; }
.fit-note { margin: 12px 0 0; color: var(--slate-600); font-size: 15px; line-height: 1.45; }
.resume-ranking { margin-top: 14px; border-top: 1px solid var(--slate-200); padding-top: 12px; }
.resume-ranking summary { cursor: pointer; color: var(--brand-700); font-size: 16px; font-weight: 800; }
.resume-ranking > div { margin-top: 10px; max-height: 300px; overflow-y: auto; border: 1px solid var(--slate-200); border-radius: 10px; }
.resume-ranking-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--slate-100); font-size: 16px; }
.resume-ranking-row:last-child { border-bottom: 0; }
.resume-ranking-row.selected { background: var(--brand-50); }
.resume-ranking-row span { display: flex; flex-direction: column; min-width: 0; }
.resume-ranking-row small { color: var(--brand-600); margin-top: 2px; }
.resume-ranking-row strong { color: var(--slate-800); white-space: nowrap; }
.application-letter-panel { margin-top: 14px; border-top: 1px solid var(--slate-200); padding-top: 12px; }
.application-letter-panel summary { cursor: pointer; color: var(--slate-800); font-weight: 800; font-size: 17px; margin-bottom: 12px; }
.application-card .field-label { margin-top: 14px; }
.application-letter {
  width: 100%; min-height: 150px; resize: vertical; border: 1px solid var(--slate-300); border-radius: 12px;
  padding: 12px 14px; font: inherit; font-size: 18px; line-height: 1.6; color: var(--slate-900); background: #fff;
}
.application-letter:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.application-send {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 18px;
}
.application-confirm { display: flex; align-items: flex-start; gap: 12px; font-size: 17px; line-height: 1.5; color: var(--slate-800); cursor: pointer; flex: 1; min-width: 260px; }
.application-confirm input { margin-top: 4px; accent-color: var(--brand-600); flex-shrink: 0; }
.application-result { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 12px; color: #065f46; font-size: 17px; }
.application-result b { color: #047857; }
.application-result span { color: #92400e; }
.applications-title-row, .history-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.applications-tabs { display: inline-flex; padding: 5px; background: var(--slate-100); border-radius: 12px; }
.applications-tabs button { border: 0; background: transparent; color: var(--slate-600); padding: 10px 16px; border-radius: 9px; font-weight: 800; font-size: 17px; cursor: pointer; }
.applications-tabs button.active { background: #fff; color: var(--slate-900); box-shadow: var(--shadow); }
.application-search-panel > .hh-query { width: 100%; }
.application-filter-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(180px, .7fr)); gap: 18px; margin-top: 16px; }
.application-filter-grid fieldset { border: 1px solid var(--slate-200); border-radius: 12px; padding: 12px 14px; }
.application-filter-grid legend { padding: 0 6px; color: var(--slate-600); font-size: 15px; font-weight: 800; }
.application-filter-checks { display: flex; align-items: center; gap: 10px 20px; flex-wrap: wrap; }
.application-filter-checks label { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; cursor: pointer; }
.application-filter-checks input { accent-color: var(--brand-600); }
.application-period { display: flex; flex-direction: column; gap: 8px; color: var(--slate-600); font-size: 15px; font-weight: 800; }
.application-period select { border: 1px solid var(--slate-300); border-radius: 12px; padding: 12px; background: #fff; font: inherit; color: var(--slate-800); font-size: 17px; }
.application-search-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.application-progress { margin-top: 14px; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 12px; padding: 13px 15px; font-size: 17px; }
.application-progress-track { height: 6px; margin-top: 10px; border-radius: 99px; background: var(--slate-200); overflow: hidden; }
.application-progress-track span { display: block; height: 100%; background: var(--brand-600); transition: width .25s ease; }
.manual-vacancy summary { cursor: pointer; font-size: 18px; font-weight: 800; }
.manual-vacancy[open] summary { margin-bottom: 12px; }
.manual-vacancy .hh-query { width: 100%; margin-bottom: 12px; }
.saved-application-searches summary { cursor: pointer; font-size: 18px; font-weight: 800; }
.saved-application-searches[open] summary { margin-bottom: 12px; }
#savedApplicationSearchList { display: flex; flex-direction: column; max-height: 360px; overflow-y: auto; }
.saved-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--slate-100); transition: background 0.15s ease, border-color 0.15s ease; }
.saved-search-row:last-child { border-bottom: 0; }
.saved-search-row.active-saved-search { background: #eff6ff; border-left: 3px solid var(--brand-600, #4f46e5); border-radius: 6px; padding-left: 10px; padding-right: 10px; }
.saved-search-row > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.saved-search-row > div:first-child b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.saved-search-row > div:first-child span { margin-top: 4px; color: var(--slate-600); font-size: 15px; }
.saved-search-row > strong { color: var(--slate-700); font-size: 15px; white-space: nowrap; }
.saved-search-row > div:last-child { display: flex; align-items: center; gap: 8px; }
.saved-search-row .btn-ghost { padding: 8px 12px; font-size: 15px; }
.saved-search-delete { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--slate-500); font-size: 23px; cursor: pointer; }
.saved-search-delete:hover { background: #fee2e2; color: #b91c1c; }
.application-table-toolbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; margin-top: 18px; background: #fff; border: 1px solid var(--slate-200); border-radius: 12px 12px 0 0; font-size: 17px; }
.application-table-toolbar span { color: var(--slate-600); }
.application-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--slate-200); background: #fff; }
.application-table { width: 100%; min-width: 1100px; border-collapse: collapse; font-size: 17px; }
.application-table th { position: sticky; top: 0; z-index: 2; text-align: left; background: var(--slate-50); color: var(--slate-600); padding: 12px 10px; border-bottom: 1px solid var(--slate-200); white-space: nowrap; font-size: 16px; }
.application-table td { padding: 12px 10px; border-bottom: 1px solid var(--slate-100); vertical-align: top; color: var(--slate-800); }
.application-table tr:hover > td { background: #fafbff; }
.application-table td small { display: block; color: var(--slate-600); margin-top: 4px; line-height: 1.4; font-size: 15px; }
.application-table input[type="checkbox"] { accent-color: var(--brand-600); width: 18px; height: 18px; }
.application-vacancy-title { display: block; max-width: 320px; border: 0; background: transparent; color: var(--slate-900); font: inherit; font-weight: 800; font-size: 18px; line-height: 1.4; text-align: left; padding: 0; cursor: pointer; }
.score-pill { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 16px; font-weight: 900; white-space: nowrap; cursor: pointer; }
.score-pill small { display: inline !important; margin: 0 !important; color: inherit !important; opacity: .8; }
.score-pill.high { background: #dcfce7; color: #166534; }
.score-pill.medium { background: #fef3c7; color: #92400e; }
.score-pill.low { background: #fee2e2; color: #991b1b; }
.state-badge { display: inline-block; max-width: 200px; padding: 6px 10px; border-radius: 999px; background: var(--slate-100); color: var(--slate-700); font-size: 15px; line-height: 1.3; }
.state-badge.active, .state-badge.response { background: #dbeafe; color: #1d4ed8; }
.state-badge.invitation { background: #dcfce7; color: #166534; }
.state-badge.discard { background: #fee2e2; color: #991b1b; }
.application-detail-row > td { padding: 0; background: var(--slate-50) !important; }
.application-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 18px; }
.application-detail-grid > section { min-width: 0; max-height: 75vh; overflow-y: auto; background: #fff; border: 1px solid var(--slate-200); border-radius: 12px; padding: 18px; }
.application-detail-grid h3 { margin: 0 0 12px; font-size: 20px; }
.split-pane-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.split-pane-title > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--slate-900); color: #fff; font-size: 14px; font-weight: 900; }
.split-pane-title h3 { margin: 0; }
.vacancy-preview-sticky { position: sticky; top: -18px; z-index: 2; margin: -18px -18px 14px; padding: 16px 18px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--slate-200); backdrop-filter: blur(8px); }
.vacancy-browser-view { padding: 4px 2px 14px; }
.vacancy-browser-badge { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #fee2e2; color: #b91c1c; font-size: 14px; font-weight: 900; letter-spacing: .04em; }
.vacancy-browser-view h2 { margin: 14px 0 6px; font-size: 28px; line-height: 1.25; }
.vacancy-browser-view h4 { margin: 0 0 14px; color: var(--slate-600); font-size: 18px; }
.vacancy-browser-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.vacancy-browser-meta span { padding: 6px 10px; border-radius: 8px; background: var(--slate-100); color: var(--slate-700); font-size: 15px; }
.vacancy-browser-salary { margin: 12px 0; font-size: 22px; font-weight: 900; color: var(--slate-900); }
.vacancy-browser-skills { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.vacancy-browser-skills span { padding: 6px 10px; border: 1px solid var(--brand-100); border-radius: 8px; color: var(--brand-700); background: var(--brand-50); font-size: 15px; font-weight: 700; }
.vacancy-browser-copy { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--slate-200); white-space: pre-line; color: var(--slate-800); font-size: 17px; line-height: 1.7; }

/* Resume Text Highlighting & Suggestions */
.resume-highlight-viewer {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 22px; margin-top: 16px;
  line-height: 1.8; font-size: 18px; color: var(--slate-900); white-space: pre-wrap;
}
.highlight-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 16px; background: var(--slate-50); border-radius: 12px; border: 1px solid var(--slate-200); }
.highlight-legend-item { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }

mark.highlight-strong {
  background: #dcfce7; color: #15803d; padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 18px; text-decoration: none;
}
mark.highlight-improve {
  background: #fef08a; color: #854d0e; padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 18px; position: relative; cursor: help; text-decoration: underline dotted #ca8a04 2px;
}
mark.highlight-improve:hover::after {
  content: attr(data-tooltip);
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--slate-900); color: #fff; padding: 8px 14px; border-radius: 10px; font-size: 16px; font-weight: 500;
  white-space: normal; width: max-content; max-width: 320px; z-index: 10; box-shadow: 0 6px 18px rgba(0,0,0,.25); line-height: 1.45;
}
mark.highlight-missing {
  background: #fee2e2; color: #b91c1c; padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 18px; text-decoration: line-through;
}

/* Side Job Location & Discovery UI */
.sidejob-badge { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; font-size: 15px; font-weight: 800; padding: 4px 10px; border-radius: 7px; }
.role-discovery-card { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.role-discovery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 12px; }
.role-card { background: #fff; border: 1px solid var(--slate-200); border-radius: 12px; padding: 16px 18px; cursor: pointer; transition: .15s; }
.role-card:hover { border-color: var(--brand-600); box-shadow: 0 6px 18px rgba(79,70,229,.14); }
.role-card.sidejob { border-left: 5px solid #f59e0b; }
.role-card.permanent { border-left: 5px solid var(--brand-600); }

.application-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.application-detail-actions a { text-decoration: none; }
.generated-letter-host, .preparation-plan-host { margin-top: 12px; }
.application-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 12px 0; }
.application-pagination span { color: var(--slate-500); font-size: 15px; }
.application-bulk-bar > span { color: var(--slate-500); font-size: 14.5px; }
.preparation-plan { margin-top: 12px; font-size: 15px; line-height: 1.5; }
.preparation-plan h4 { margin: 16px 0 7px; font-size: 15px; }
.preparation-plan ul, .preparation-plan ol { margin: 6px 0; padding-left: 20px; }
.preparation-plan-head { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; background: var(--brand-50); }
.preparation-plan-head div { display: flex; flex-direction: column; }
.preparation-plan-head span { color: var(--slate-500); font-size: 12px; }
.preparation-plan-head b { font-size: 25px; color: var(--brand-700); }
.preparation-plan-head p { margin: 0; }
.plan-day { padding: 9px 11px; margin-top: 7px; background: var(--slate-50); border-left: 3px solid var(--brand-500, #6366f1); border-radius: 0 8px 8px 0; }
.productstar-lessons { display: grid; gap: 8px; }
.productstar-lessons a { display: block; padding: 10px 11px; border: 1px solid var(--slate-200); border-radius: 9px; color: inherit; text-decoration: none; }
.productstar-lessons a:hover { border-color: var(--brand-500, #6366f1); }
.productstar-lessons span { display: block; color: var(--slate-500); font-size: 13px; }
.productstar-lessons p { margin: 5px 0 0; color: var(--slate-600); }
.history-toolbar { margin-bottom: 14px; }
.history-toolbar h2 { margin: 0 0 4px; }

@media (max-width: 560px) {
  .hh-search-row { flex-direction: column; }
  .market-vacancies { grid-template-columns: 1fr; }
  .plan-lesson { flex-direction: column; align-items: stretch; }
  .plan-lesson-link { text-align: center; }
  .application-search-row { flex-direction: column; }
  .application-card-head { flex-direction: column; }
  .application-send { flex-direction: column; align-items: stretch; }
  .fit-score-projected { text-align: left; }
  .ai-adaptation-head { grid-template-columns: 1fr; }
  .ai-provider-control { grid-template-columns: 1fr; }
  .ai-adaptation-head em { grid-column: auto; }
  .application-match > a { white-space: normal; }
  .application-filter-grid, .application-detail-grid { grid-template-columns: 1fr; }
  .saved-search-row { grid-template-columns: 1fr; }
  .saved-search-row > div:last-child { flex-wrap: wrap; }
  .application-detail-grid > section { max-height: none; }
  .application-search-actions .btn-primary { width: 100%; }
  .application-table-toolbar { position: static; }
  .application-bulk-bar { bottom: 70px; }
}

@media (max-width: 1023px) {
  .sidebar { display: none; }
  .mobile-nav { display: flex; }
  .view { padding: 18px 14px; }
}

/* Widescreen 1440p / 4K / Ultra-wide optimizations */
@media (min-width: 1440px) {
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
  .application-detail-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .market-vacancies { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}

/* Resume Text Highlighting & Suggestions */
.resume-highlight-viewer {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 20px; margin-top: 14px;
  line-height: 1.7; font-size: 16px; color: var(--slate-800); white-space: pre-wrap;
}
.highlight-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 14px; background: var(--slate-50); border-radius: 10px; border: 1px solid var(--slate-200); }
.highlight-legend-item { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }

mark.highlight-strong {
  background: #dcfce7; color: #15803d; padding: 2px 6px; border-radius: 4px; font-weight: 600; text-decoration: none;
}
mark.highlight-improve {
  background: #fef08a; color: #854d0e; padding: 2px 6px; border-radius: 4px; font-weight: 600; position: relative; cursor: help; text-decoration: underline dotted #ca8a04 2px;
}
mark.highlight-improve:hover::after {
  content: attr(data-tooltip);
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--slate-900); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 14px; font-weight: 500;
  white-space: normal; width: max-content; max-width: 280px; z-index: 10; box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
mark.highlight-missing {
  background: #fee2e2; color: #b91c1c; padding: 2px 6px; border-radius: 4px; font-weight: 600; text-decoration: line-through;
}

/* Side Job Location & Discovery UI */
.sidejob-badge { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; font-size: 13px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.role-discovery-card { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.role-discovery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 10px; }
.role-card { background: #fff; border: 1px solid var(--slate-200); border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: .15s; }
.role-card:hover { border-color: var(--brand-600); box-shadow: 0 4px 14px rgba(79,70,229,.12); }
.role-card.sidejob { border-left: 4px solid #f59e0b; }
.role-card.permanent { border-left: 4px solid var(--brand-600); }

.badge-green { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.badge-yellow { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-red { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* CRM Kanban Board */
.crm-board {
  display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start;
}
.crm-col {
  flex: 0 0 300px;
  background: var(--slate-100);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  max-height: 80vh;
}
.crm-col-header {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 2px solid var(--slate-200);
  display: flex; justify-content: space-between; align-items: center;
}
.crm-col-count {
  background: var(--slate-300); color: var(--slate-800); font-size: 12px; padding: 2px 8px; border-radius: 12px;
}
.crm-col-body {
  padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
}
.crm-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.1s, box-shadow 0.1s;
}
.crm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  border-color: var(--brand-600);
}
.crm-card-title {
  font-weight: 700; font-size: 14px; color: var(--slate-900); margin-bottom: 4px; line-height: 1.3;
}
.crm-card-company {
  font-size: 13px; color: var(--slate-600); margin-bottom: 8px;
}
.crm-card-meta {
  display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--slate-500);
}
.crm-status-indicator {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px;
}
.crm-card.dragging {
  opacity: 0.45;
  transform: scale(0.98);
}
.crm-col-body.drag-over {
  background: rgba(99, 102, 241, 0.08);
  outline: 2px dashed #6366f1;
  border-radius: 6px;
}

/* Modal Chat Styles */
.crm-chat-modal {
  display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-height: 0; overflow-y: auto;
  background: var(--slate-50); padding: 16px; border-radius: var(--radius); border: 1px solid var(--slate-200);
}
.crm-chat-msg {
  padding: 12px; border-radius: 12px; font-size: 14px; max-width: 85%;
}
.crm-chat-hr {
  background: #fff; border: 1px solid var(--slate-200); align-self: flex-start; border-bottom-left-radius: 4px;
}
.crm-chat-me {
  background: var(--brand-50); border: 1px solid var(--brand-100); align-self: flex-end; border-bottom-right-radius: 4px;
}
.crm-chat-meta {
  font-size: 11px; color: var(--slate-500); margin-top: 6px; text-align: right;
}
.crm-ai-events {
  background: #fffbeeb3; border: 1px solid #fde68a; padding: 12px; border-radius: 8px; margin-top: 16px;
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4); 
  z-index: 1000; padding: 16px;
  backdrop-filter: blur(4px);
}

/* CRM Calendar UI */
.crm-calendar-widget {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius);
  margin-bottom: 24px; display: flex; flex-direction: column; overflow: hidden;
}
.crm-calendar-header {
  background: var(--slate-50); padding: 16px 20px; font-size: 17px; font-weight: 700;
  border-bottom: 1px solid var(--slate-200); display: flex; justify-content: space-between; align-items: center;
}
.crm-calendar-body {
  padding: 16px; overflow-x: auto; white-space: nowrap; display: flex; gap: 16px;
}
.crm-calendar-event {
  background: var(--brand-50); border: 1px solid var(--brand-100); padding: 12px 16px;
  border-radius: 12px; min-width: 240px; white-space: normal; position: relative;
}
.crm-calendar-event-date {
  font-size: 15px; font-weight: 800; color: var(--brand-700); margin-bottom: 4px;
}
.crm-calendar-event-desc {
  font-size: 14px; color: var(--slate-800); line-height: 1.4;
}
.crm-calendar-event-actions {
  position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 10px; font-size: 14px;
}
.crm-calendar-event-delete {
  cursor: pointer; color: var(--slate-400); font-size: 14px;
}
.crm-calendar-event-delete:hover {
  color: #ef4444;
}
.crm-calendar-empty {
  padding: 24px; text-align: center; color: var(--slate-500); width: 100%;
}

/* CRM Calendar Navigation & Weekday (Mon-Fri) Controls */
.crm-cal-toolbar {
  background: #fff;
  border-bottom: 1px solid var(--slate-200);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.crm-cal-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.crm-cal-nav-btn {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  color: var(--slate-700);
  transition: all 0.15s;
  padding: 0;
}
.crm-cal-nav-btn:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}
.crm-cal-week-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--slate-800);
  min-width: 170px;
  text-align: center;
}
.crm-cal-view-modes {
  display: inline-flex;
  background: var(--slate-100);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}
.crm-cal-mode-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  color: var(--slate-600);
  transition: all 0.15s;
}
.crm-cal-mode-btn.active {
  background: #fff;
  color: var(--brand-700);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* 5-day Week Grid (Monday - Friday) */
.crm-cal-week-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
  padding: 16px;
  background: var(--slate-50);
  overflow-x: auto;
}
.crm-cal-day-col {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.crm-cal-day-col.is-today {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}
.crm-cal-day-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--slate-100);
  background: #fff;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.crm-cal-day-col.is-today .crm-cal-day-header {
  background: #eff6ff;
  border-bottom-color: #bfdbfe;
}
.crm-cal-day-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.crm-cal-weekday-name {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-700);
}
.crm-cal-day-col.is-today .crm-cal-weekday-name {
  color: var(--brand-700);
}
.crm-cal-day-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-400);
}
.crm-cal-day-col.is-today .crm-cal-day-date {
  color: var(--brand-600);
}
.crm-cal-today-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--brand-600);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}
.crm-cal-day-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--slate-100);
  color: var(--slate-600);
}
.crm-cal-day-count.has-events {
  background: #dbeafe;
  color: #1e40af;
}
.crm-cal-day-events {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.crm-cal-day-empty {
  color: var(--slate-400);
  font-size: 12px;
  font-style: italic;
  text-align: center;
  margin: auto 0;
  padding: 16px 8px;
}

/* Event Card inside Week Grid */
.crm-cal-grid-card {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 8px;
  padding: 10px 12px;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}
.crm-cal-grid-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.crm-cal-grid-time {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-700);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.crm-cal-grid-company {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.3;
}
.crm-cal-grid-vacancy {
  font-size: 12px;
  color: var(--slate-700);
  margin-top: 2px;
  line-height: 1.3;
}
.crm-cal-grid-format {
  font-size: 11px;
  color: var(--slate-500);
  margin-top: 4px;
}

/* Weekday badge in horizontal list */
.crm-cal-weekday-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--brand-100);
  color: var(--brand-800);
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
  letter-spacing: 0.03em;
}

/* Autopilot UI Updates */
.ap-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.ap-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.ap-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--slate-300);
  transition: .4s;
  border-radius: 24px;
}
.ap-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .ap-slider {
  background-color: var(--brand-600);
}
input:checked + .ap-slider:before {
  transform: translateX(20px);
}

.ap-log-card {
  padding: 16px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: white;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  /* overflow:hidden removed on purpose: it clipped long status/warnings text.
     The colored left bar is rounded via ::before instead. */
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.ap-log-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}
.ap-log-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 4px;
  border-radius: 12px 0 0 12px;
}
.ap-log-applied::before { background: var(--success); }
.ap-log-skipped::before { background: var(--slate-400); }
.ap-log-error::before { background: var(--danger); }

.ap-log-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.ap-log-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 2px;
}
.ap-log-company {
  font-size: 13px;
  color: var(--slate-500);
}
.ap-log-time {
  font-size: 12px;
  color: var(--slate-400);
  white-space: nowrap;
}
.ap-log-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.ap-log-reason {
  font-size: 13px;
  color: var(--slate-600);
  background: var(--slate-50);
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 8px;
}
.ap-cover-letter {
  margin-top: 12px;
  font-size: 13px;
}
.ap-cover-letter summary {
  cursor: pointer;
  color: var(--brand-600);
  font-weight: 500;
  list-style: none;
}
.ap-cover-letter summary::-webkit-details-marker {
  display: none;
}
.ap-cover-letter summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform 0.2s;
}
.ap-cover-letter[open] summary::before {
  transform: rotate(90deg);
}
.ap-stats-board {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.ap-stat-badge {
  flex: 1;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
}
.ap-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--slate-900);
}
.ap-stat-label {
  font-size: 12px;
  color: var(--slate-500);
  margin-top: 4px;
}

/* Autopilot Forms Updates */
.ap-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--slate-300);
  border-radius: 10px;
  background-color: var(--slate-50);
  font-size: 14px;
  color: var(--slate-900);
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
  box-sizing: border-box;
}
.ap-input:focus {
  outline: none;
  border-color: var(--brand-500);
  background-color: white;
  box-shadow: 0 0 0 3px var(--brand-100), inset 0 1px 2px rgba(0,0,0,0.02);
}
.ap-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 6px;
}
.ap-field {
  margin-bottom: 16px;
}
.ap-run-btn {
  display: inline-flex;
  justify-content: center;
  width: auto;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  background-color: var(--brand-600);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.ap-run-btn:hover {
  background-color: var(--brand-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.ap-run-btn:disabled {
  background-color: var(--slate-400);
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

/* ---- Settings gear (sidebar-foot) ---- */
.settings-gear {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 6px 8px; margin-bottom: 0; box-sizing: border-box;
  background: transparent; border: 1px solid var(--slate-200); border-radius: 6px;
  color: var(--slate-600); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.settings-gear:hover { background: var(--slate-100); border-color: var(--slate-300); color: var(--slate-800); }
.settings-gear .nav-ico { font-size: 14px; width: 18px; text-align: center; }

/* ---- Settings modal ---- */
.stg-section { border: 1px solid var(--slate-200); border-radius: 10px; padding: 12px 14px; }
.stg-section + .stg-section { margin-top: 12px; }
.stg-title { font-size: 14px; font-weight: 700; color: var(--slate-800); margin: 0 0 4px; }
.stg-hint { font-size: 12px; color: var(--slate-500); margin: 0 0 10px; line-height: 1.45; }
.stg-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.stg-row:last-child { margin-bottom: 0; }
.stg-label { font-size: 12px; font-weight: 600; color: var(--slate-700); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stg-state { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.stg-state.on { background: #dcfce7; color: #166534; }
.stg-state.off { background: #fef3c7; color: #92400e; }
.stg-input, .stg-textarea {
  width: 100%; box-sizing: border-box; padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--slate-300); border-radius: 8px; background: #fff; color: var(--slate-800);
  font-family: inherit;
}
.stg-textarea { min-height: 72px; resize: vertical; font-family: ui-monospace, monospace; font-size: 12px; }
.stg-input:focus, .stg-textarea:focus { outline: 2px solid var(--brand-500, #6366f1); outline-offset: -1px; }
.stg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stg-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.stg-status { font-size: 12px; margin-top: 8px; min-height: 16px; }

.stg-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  margin-bottom: 12px;
}
.stg-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-100, #e0e7ff);
  color: var(--brand-700, #4338ca);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.stg-user-details {
  flex: 1;
  min-width: 0;
}
.stg-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--slate-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stg-user-meta {
  font-size: 12px;
  color: var(--slate-500);
}
.highlight-section {
  animation: stgHighlight 1.8s ease-out;
}
@keyframes stgHighlight {
  0% { box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4); border-color: var(--brand-500); }
  100% { box-shadow: none; }
}

.pos-card.active { border-color: var(--primary-color); box-shadow: 0 0 0 1px var(--primary-color); background-color: #eff6ff; }

/* ---- Domain Frequency Explorer: Region Tabs & Role Item Selection ---- */
.domain-region-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.domain-region-btn {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.domain-region-btn:hover {
  background: var(--slate-100);
  border-color: var(--slate-300);
  color: var(--slate-800);
}
.domain-region-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
}

.domain-role-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  font-size: 0.82rem;
  border: 1px solid var(--slate-100);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.domain-role-item:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
}
.domain-role-item.active-role {
  background: #e0f2fe;
  border-color: #0284c7;
  box-shadow: 0 0 0 1px #0284c7;
}
.domain-role-item.active-role .role-title-text {
  color: #0369a1;
  font-weight: 700;
}

.exact-role-count-card {
  background: #fff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.08);
}

/* ========================================================
   Низкая конкуренция & Side-by-Side Адаптация Резюме
   ======================================================== */

.low-comp-hub-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f8fafc 100%);
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.low-comp-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 1rem;
}

.low-comp-role-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.low-comp-role-card:hover {
  transform: translateY(-2px);
  border-color: #10b981;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.12);
}

.low-comp-role-card.role-card-fading {
  opacity: 0;
  transform: scale(0.94);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hide-low-comp-role-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.hide-low-comp-role-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.low-comp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.missing-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-right: 4px;
  margin-bottom: 4px;
}

.present-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.72rem;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* Side-by-Side Modal */
.diff-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  animation: fadeIn 0.15s ease-out;
}

.diff-modal-dialog {
  background: #ffffff;
  border-radius: 16px;
  width: 95vw;
  max-width: 1400px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.diff-modal-header {
  padding: 1.25rem 1.75rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.diff-modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  flex: 1;
}

.diff-modal-footer {
  padding: 1rem 1.75rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.diff-columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.diff-column-panel {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.diff-col-header {
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
}

.diff-col-before .diff-col-header {
  background: #f1f5f9;
  color: #334155;
}

.diff-col-after .diff-col-header {
  background: #ecfdf5;
  color: #065f46;
  border-bottom-color: #a7f3d0;
}

.diff-content-scroll {
  padding: 1rem 1.25rem;
  max-height: 60vh;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
}

.diff-skill-added-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 2px 9px;
  font-weight: 700;
  font-size: 0.8rem;
  margin: 2px;
  box-shadow: 0 1px 2px rgba(34, 197, 94, 0.15);
}

.diff-exp-modified-block {
  background: #f0fdf4;
  border-left: 4px solid #10b981;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.05);
}

.diff-inserted-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #bbf7d0;
  color: #166534;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  margin-top: 4px;
  margin-right: 4px;
}

/* ==========================================================================
   RESUME ACCORDION & SIDE-BY-SIDE STUDIO STYLES
   ========================================================================== */

.resume-card-wrapper {
  margin-bottom: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  background: #fff;
  transition: all 0.2s ease;
  overflow: hidden;
}

.resume-card-wrapper.is-open {
  border-color: var(--brand-500);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.12);
}

.resume-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  background: #fff;
  transition: background 0.15s ease;
}

.resume-header-row:hover {
  background: #f8fafc;
}

.resume-accordion-body {
  display: none;
  padding: 18px;
  background: #f8fafc;
  border-top: 1px solid var(--slate-200);
}

.resume-card-wrapper.is-open .resume-accordion-body {
  display: block;
}

.side-by-side-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

@media (max-width: 900px) {
  .side-by-side-grid {
    grid-template-columns: 1fr;
  }
}

.side-col-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.side-col-card.adapted-col {
  border-color: #86efac;
}

.side-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  border-bottom: 1px solid var(--slate-200);
  background: #f1f5f9;
  color: var(--slate-700);
}

.side-col-header.adapted {
  background: #ecfdf5;
  color: #065f46;
  border-bottom-color: #a7f3d0;
}

.side-col-content {
  padding: 14px;
  font-size: 0.86rem;
  line-height: 1.6;
  max-height: 620px;
  overflow-y: auto;
  white-space: pre-wrap;
  color: var(--slate-800);
  font-family: inherit;
}

/* Experience block-by-block styling */
.experience-block-card {
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
}

.exp-block-header {
  padding: 8px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-800);
}

.exp-block-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
}

@media (max-width: 800px) {
  .exp-block-body {
    grid-template-columns: 1fr;
  }
}

.exp-bullet-item {
  margin-bottom: 6px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.exp-bullet-item.is-modified {
  background: #f0fdf4;
  border-left: 3px solid #10b981;
  padding: 4px 8px;
  border-radius: 3px;
}

/* Diff Highlight & Block Breakdown Styles */
mark.diff-highlight-add,
.diff-highlight-add {
  background: #bbf7d0 !important;
  color: #14532d !important;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #86efac;
  box-shadow: 0 1px 2px rgba(20, 83, 45, 0.08);
  display: inline;
}

.diff-inserted-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  white-space: nowrap;
}

.diff-skill-tag-neutral {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  white-space: nowrap;
}

.breakdown-overview-bar {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.breakdown-section-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.breakdown-section-header {
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-800);
}

.breakdown-2col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px;
}

@media (max-width: 800px) {
  .breakdown-2col-grid {
    grid-template-columns: 1fr;
  }
}

.breakdown-col-header {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--slate-500);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breakdown-col-header.adapted {
  color: #15803d;
}

.recommendation-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.recommendation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-incorporate-skill {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-incorporate-skill:hover:not(:disabled) {
  background: #0369a1;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
  transform: translateY(-1px);
}

.btn-incorporate-skill:disabled {
  opacity: 0.9;
  cursor: default;
}

.full-resume-preview-box {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  padding: 16px;
  max-height: 550px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--slate-800);
}

.view-toggle-btn-group {
  display: inline-flex;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.view-toggle-pill {
  font-size: 0.76rem;
  padding: 4px 10px;
  border: none;
  background: #fff;
  color: var(--slate-600);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}

.view-toggle-pill.active {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
}

/* Portfolio audit widgets */
.portfolio-audit-banner {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.audit-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.audit-metric-card {
  padding: 10px 14px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
}

.audit-metric-card.warning {
  background: #fff7ed;
  border-color: #fdba74;
}

.audit-metric-card.danger {
  background: #fef2f2;
  border-color: #fca5a5;
}

.audit-metric-card.success {
  background: #f0fdf4;
  border-color: #86efac;
}

.rotation-card {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 768px) {
  .rotation-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* HeadHunter Statuses and Visibility Badges */
.hh-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  line-height: 1.3;
  white-space: nowrap;
}

/* Publication statuses */
.hh-status-published {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.hh-status-on_moderation {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

.hh-status-not_published {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.hh-status-blocked {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Access / Visibility statuses */
.hh-access-clients {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.hh-access-everyone {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.hh-access-blacklist {
  background: #f5f3ff;
  color: #6b21a8;
  border: 1px solid #ddd6fe;
}

.hh-access-whitelist {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.hh-access-direct {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.hh-access-no_one {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.hh-access-local {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Bump / Publish indicator */
.hh-bump-ready {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.hh-bump-cooldown {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.hh-visibility-selector-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hh-visibility-select {
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--slate-300);
  background: #fff;
  color: var(--slate-700);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.hh-visibility-select:hover {
  border-color: var(--brand-500);
}

/* ==========================================================================
   BLOCK BREAKDOWN INLINE EDITOR & ACTION BAR STYLES
   ========================================================================== */

.breakdown-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-action-hh {
  background: #0284c7;
  color: #fff;
  border: 1px solid #0369a1;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-action-hh:hover:not(:disabled) {
  background: #0369a1;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.btn-action-local {
  background: #059669;
  color: #fff;
  border: 1px solid #047857;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-action-local:hover:not(:disabled) {
  background: #047857;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.btn-action-studio {
  background: #4f46e5;
  color: #fff;
  border: 1px solid #4338ca;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-action-studio:hover:not(:disabled) {
  background: #4338ca;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.btn-action-plan {
  background: #0d9488;
  color: #fff;
  border: 1px solid #0f766e;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-action-plan:hover:not(:disabled) {
  background: #0f766e;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}

.diff-skill-tag-remove {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  white-space: nowrap;
}

.skill-remove-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.bullet-edit-row {
  margin-bottom: 8px;
  position: relative;
}

.block-textarea-bullet {
  width: 100%;
  font-size: 0.84rem;
  line-height: 1.5;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  padding: 6px 8px;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.block-textarea-bullet:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.block-textarea-bullet.is-modified {
  border-color: #86efac;
  background: #f0fdf4;
}

.block-textarea-summary,
.block-textarea-education {
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.block-textarea-summary:focus,
.block-textarea-education:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.breakdown-action-status {
  animation: fadeIn 0.2s ease-in-out;
}

/* =====================================================
   Headline Funnel Banner (всегда видимый, вверху
   вкладки «История откликов»)
   ===================================================== */
.funnel-banner {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: hidden;
  margin-bottom: 20px;
  flex-wrap: nowrap;
}

.funnel-banner-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  text-align: center;
  position: relative;
  border-right: 1px solid var(--slate-100);
  transition: background 0.15s;
  min-width: 0;
}

.funnel-banner-step:last-child {
  border-right: none;
}

.funnel-banner-step:hover {
  background: var(--slate-50);
}

.funnel-banner-step__icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 4px;
}

.funnel-banner-step__count {
  font-size: 22px;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.1;
}

.funnel-banner-step__label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--slate-500);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.funnel-banner-step__rate {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 5px;
  background: var(--slate-100);
  color: var(--slate-500);
}

/* per-step color accents */
.funnel-banner-step--sent   .funnel-banner-step__count { color: #4338ca; }
.funnel-banner-step--sent   .funnel-banner-step__rate  { background: #ede9fe; color: #5b21b6; }

.funnel-banner-step--viewed .funnel-banner-step__count { color: #7c3aed; }
.funnel-banner-step--viewed .funnel-banner-step__rate  { background: #f5f3ff; color: #7c3aed; }

.funnel-banner-step--invite .funnel-banner-step__count { color: #0284c7; }
.funnel-banner-step--invite .funnel-banner-step__rate  { background: #e0f2fe; color: #0369a1; }

.funnel-banner-step--interview .funnel-banner-step__count { color: #b45309; }
.funnel-banner-step--interview .funnel-banner-step__rate  { background: #fef3c7; color: #92400e; }

.funnel-banner-step--offer  .funnel-banner-step__count { color: #15803d; }
.funnel-banner-step--offer  .funnel-banner-step__rate  { background: #dcfce7; color: #166534; }

.funnel-banner-step--reject .funnel-banner-step__count { color: #b91c1c; }
.funnel-banner-step--reject .funnel-banner-step__rate  { background: #fee2e2; color: #991b1b; }

/* Arrow between steps */
.funnel-banner-arrow {
  display: flex;
  align-items: center;
  color: var(--slate-300);
  font-size: 16px;
  flex-shrink: 0;
  padding: 0 2px;
  background: #fff;
  border-right: 1px solid var(--slate-100);
}

@media (max-width: 700px) {
  .funnel-banner { flex-wrap: wrap; }
  .funnel-banner-step { min-width: 45%; border-right: 1px solid var(--slate-100); border-bottom: 1px solid var(--slate-100); }
  .funnel-banner-arrow { display: none; }
}


