@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&family=Unbounded:wght@600;800&display=swap");

:root {
  --navy: #141414;
  --navy-2: #2a2a2a;
  --gold: #5c6b75;
  --gold-d: #3e4a52;
  --ink: #1a1f2b;
  --muted: #5c6b80;
  --paper: #f4f1ea;
  --line: #d7e0ee;
  --ok: #1f7a4d;
  --bad: #b42318;
  --soft: #eef3fa;
  --high: #1f7a4d;
  --mid: #8a6d12;
  --low: #b42318;
  --high-bg: #eef8f0;
  --mid-bg: #fff4d6;
  --low-bg: #fde8e8;
  --font: Manrope, "Segoe UI", Helvetica Neue, Arial, sans-serif;
  --display: Unbounded, Manrope, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 14px; }
#app { min-height: 100vh; display: flex; flex-direction: column; }
.site-foot {
  margin-top: auto;
  padding: 22px 16px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .01em;
}
.site-foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
button:not(:disabled), [role="button"] { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
a { color: inherit; text-decoration: none; }

.wrap, .container { max-width: 1280px; margin: 22px auto; padding: 0 16px 40px; }
.cv-page { max-width: 1400px; }
.cv-layout { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 22px; align-items: start; }
.cv-side {
  background: #fff; border-radius: 18px; padding: 18px 18px 24px;
  box-shadow: 0 8px 24px rgba(11,31,58,.06);
  position: sticky; top: 72px; align-self: start;
  max-height: calc(100vh - 88px); overflow: auto;
}
.btn.on { background: var(--navy); color: #fff; }
.cv-doc h2 { margin: 0 0 10px; }
.cv-frame { background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); min-height: 78vh; }
.cv-frame iframe { width: 100%; height: 82vh; border: 0; background: #525659; }
.cv-sheet {
  background: #fff; border-radius: 16px; padding: 28px 32px; min-height: 70vh;
  white-space: pre-wrap; line-height: 1.55; font-size: 15px;
  column-count: 2; column-gap: 36px; border: 1px solid var(--line);
}
@media (max-width: 900px) {
  .cv-layout { grid-template-columns: 1fr; }
  .cv-sheet { column-count: 1; }
  .cv-frame iframe { height: 70vh; }
}
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); color: #fff;
  padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff; }
.brand img { height: 34px; width: auto; display: block; background: #fff; border-radius: 8px; padding: 3px 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
  font-family: var(--display); font-size: 20px; font-weight: 800;
  letter-spacing: .22em; text-transform: uppercase;
}
.brand-text span { font-size: 11px; opacity: .9; color: #fff; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a, .nav button.navbtn {
  border: 0; background: transparent; font: inherit; font-weight: 700;
  color: rgba(255,255,255,.82); padding: 8px 14px; border-radius: 999px; min-height: 38px;
}
.nav a.on, .nav button.navbtn.on { background: #fff; color: var(--navy); }
.tools { display: flex; align-items: center; gap: 8px; }
.lang, .ghost, .btn-logout {
  height: 34px; padding: 0 12px; border: 1px solid rgba(255,255,255,.28);
  background: transparent; color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; font-family: inherit;
}
h1 {
  font-family: var(--display); font-size: 28px; font-weight: 800;
  margin: 0 0 10px; color: var(--navy); letter-spacing: .02em;
}
.lead { color: var(--muted); margin: 0 0 16px; line-height: 1.45; }
.card {
  background: #fff; border-radius: 20px; padding: 20px; margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(11,31,58,.06);
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; font-family: inherit; background: #fff; color: var(--ink);
  min-height: 42px;
}
textarea { min-height: 88px; }
label { display: block; margin-bottom: 12px; font-weight: 600; }
label span { display: block; margin-bottom: 6px; }
.prio { margin: 0; min-width: 148px; font-weight: 600; }
.prio span { font-size: 11px; color: var(--muted); }
.prio select { min-height: 42px; }
.btn, .btn-primary, .btn-save {
  border: 0; border-radius: 999px; font-weight: 700; font-family: inherit;
  padding: 11px 18px; background: var(--navy); color: #fff; min-height: 42px;
}
.btn.out, .btn-secondary { background: #e4ebf5; color: #24324d; }
.btn.danger { background: var(--bad); color: #fff; }
.err { color: var(--bad); font-size: 13px; background: #fde8e8; padding: 10px; border-radius: 12px; }
.ok, .save-status { color: var(--ok); font-size: 13px; font-weight: 700; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(1200px 600px at 20% -10%, #2a2a2a 0%, var(--navy) 55%, #070707 100%);
}
.login { width: 100%; max-width: 400px; background: #fff; border-radius: 22px; padding: 36px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.login .brand { color: var(--navy); justify-content: center; margin-bottom: 8px; }
.login .brand img { height: 42px; }
.login h1 { text-align: center; letter-spacing: .28em; }
.login .lead { text-align: center; }
.login .btn { width: 100%; }
.sieve-screen {
  margin: 28px auto;
  max-width: 420px;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 16px 40px rgba(20,20,20,.08);
}
.sieve-screen img { width: 72px; height: 72px; animation: sieve-rock 1s ease-in-out infinite; }
.sieve-mesh {
  width: 180px; height: 14px; border-radius: 8px;
  background: repeating-linear-gradient(90deg, var(--gold-d) 0 2px, transparent 2px 8px);
  animation: sieve-rock 1s ease-in-out infinite;
}
.sieve-cards { position: relative; width: 180px; height: 36px; }
.sieve-cards span {
  position: absolute; top: 0; width: 28px; height: 34px; border-radius: 4px;
  background: var(--paper); border: 1px solid var(--gold-d);
  animation: sieve-fall 1.1s ease-in infinite;
}
.sieve-cards span:nth-child(1) { left: 10px; }
.sieve-cards span:nth-child(2) { left: 54px; animation-delay: .2s; }
.sieve-cards span:nth-child(3) { left: 98px; animation-delay: .4s; }
.sieve-cards span:nth-child(4) { left: 140px; animation-delay: .6s; }
.sieve-screen p { font-weight: 800; letter-spacing: .04em; color: var(--navy); }
@keyframes sieve-rock { 50% { transform: rotate(8deg); } }
@keyframes sieve-fall {
  0% { transform: translateY(-18px); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(28px); opacity: 0; }
}
.list { list-style: none; }
.list li {
  padding: 0; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px;
  overflow: hidden; background: #fff;
}
.list li:hover { border-color: var(--gold); box-shadow: 0 10px 24px rgba(11,31,58,.12); }
.cand { display: block; padding: 14px 16px; }
.cand-wrap { display: flex; align-items: flex-start; }
.cand-wrap .cand { flex: 1; min-width: 0; }
.cand-wrap .star { margin: 8px 0 0 4px; }
.name { margin: 0; font-size: 16px; font-weight: 800; color: var(--navy); }
.meta { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-weight: 700; }
.star { border: 0; background: transparent; font-size: 18px; color: #c5cdd6; min-width: 44px; min-height: 44px; }
.star.on { color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 18px; }
.stat { background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 8px 24px rgba(11,31,58,.06); }
.stat b { display: block; font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--navy); }
.stat span { color: var(--muted); font-size: 13px; }
.note { padding: 10px 0; border-top: 1px solid var(--line); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; margin-right: 6px; }
.dot.on { background: var(--ok); }
.dot.off { background: var(--bad); }
.copy { border: 0; background: transparent; color: #2a5298; font: inherit; font-weight: 700; text-decoration: underline; padding: 0; }
.reason { font-size: 12px; margin-right: 6px; display: inline-block; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; min-height: 18px; }
.reason.ok { color: var(--ok); }
.reason.partial { color: #c47b17; }
.reason.no { color: var(--bad); }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin: 10px 0 14px; white-space: nowrap; }
.toggle input { width: 18px; height: 18px; accent-color: var(--navy); }
@media (max-width: 800px) {
  .header .nav { display: none; }
  .mnav { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 16px; background: var(--navy); }
}
.hint { font-size: 13px; color: var(--muted); word-break: break-all; }
.ask { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 12px 0 16px; display: grid; gap: 8px; }
.ask b { font-size: 16px; }
.ask .btn { text-align: left; height: auto; padding: 10px 14px; }
.ask small { display: block; font-weight: 500; color: var(--muted); margin-top: 2px; }
.understood { margin: 8px 0 0; color: var(--ok); font-weight: 700; }
.match { float: right; font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 999px; }
.m-high { background: var(--high-bg); color: var(--high); }
.m-mid { background: var(--mid-bg); color: var(--mid); }
.m-low { background: var(--low-bg); color: var(--low); }
.drop {
  border: 1px dashed var(--line); border-radius: 16px; padding: 36px 20px; text-align: center;
  background: #fff; color: var(--muted); font-weight: 600;
}
.drop.on { border-color: var(--navy); background: var(--soft); color: var(--navy); }
.drop input { margin-top: 12px; }
.filters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 12px 0; }
.team-list { display: flex; flex-direction: column; gap: 12px; }
.team-list li { padding: 0; border: 0; box-shadow: none; background: transparent; }
.team-card, .team-card form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 14px;
  align-items: end;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(11,31,58,.06);
}
.team-card .row { grid-column: 1 / -1; }
.hidden { display: none !important; }
.mnav { display: none; }
.idle-note { font-size: 12px; opacity: .8; }
@media (max-width: 800px) {
  .nav { display: none; }
  .mnav {
    display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px;
    background: var(--navy); border-top: 1px solid rgba(255,255,255,.08);
    position: sticky; top: 54px; z-index: 49;
  }
  .mnav .navbtn { color: rgba(255,255,255,.82); background: transparent; border: 0; border-radius: 999px; font-weight: 700; padding: 8px 14px; white-space: nowrap; }
  .mnav .navbtn.on { background: #fff; color: var(--navy); }
  .header { flex-wrap: wrap; }
  .stats { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
}
