:root {
  --bg: #eef1f5;
  --text: #16263a;
  --muted: #586575;
  --navy: #1f4e79;
  --navy-d: #163a5c;
  --amber: #f4a300;
  --line: #e2e6ec;
  --err: #b42318;
  --card: #fff;
  --shadow: 0 18px 50px -24px rgba(22, 40, 60, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: Manrope, system-ui, sans-serif;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(244, 163, 0, 0.18), transparent 60%),
    radial-gradient(700px 380px at -10% 40%, rgba(31, 78, 121, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.auth { display: grid; place-items: center; padding: 32px 16px; }
.card {
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 28px 32px;
  box-shadow: var(--shadow);
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.brand strong { display: block; font-weight: 800; }
.brand span:not(.mark) { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.mark {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--navy), var(--navy-d));
  color: var(--amber); font-weight: 800; font-size: 13px;
}
h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.03em; }
.lead { margin: 8px 0 22px; color: var(--muted); font-size: 0.95rem; }
.err {
  background: #fff4f2; border: 1px solid #f0c7c0; color: var(--err);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; font-weight: 700; font-size: 14px;
}
form label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 14px; }
input[type="text"], input[type="password"] {
  width: 100%; margin-top: 6px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 15px;
  background: #f8fafc; color: var(--text);
}
input:focus { outline: 2px solid rgba(31, 78, 121, 0.35); border-color: var(--navy); background: #fff; }
.pass-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pass-row input { margin-top: 0; flex: 1; }
.eye {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  cursor: pointer; display: grid; place-items: center;
}
.eye:hover, .eye[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.go, .ghost {
  font: inherit; font-weight: 800; cursor: pointer; border-radius: 12px;
}
.go {
  width: 100%; margin-top: 6px; padding: 13px 16px; border: 0;
  background: linear-gradient(160deg, var(--navy), var(--navy-d)); color: #fff;
}
.go:hover { filter: brightness(1.08); }

.in { padding: 0; }
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 24px; background: #fff; border-bottom: 1px solid var(--line);
}
.ghost {
  padding: 10px 14px; border: 1px solid var(--line); background: #fff; color: var(--navy);
}
.hero-stub { max-width: 640px; padding: 72px 24px; }
.eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: #c67d08; margin-bottom: 12px;
}
.hero-stub h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; }
.hero-stub p:last-child { color: var(--muted); font-size: 1.05rem; max-width: 52ch; }

.dash { min-height: 100vh; }
.sticky-top {
  position: sticky; top: 0; z-index: 40;
}
.tiles {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px;
  padding: 16px 24px 8px; position: sticky; top: 72px; z-index: 30;
  background: linear-gradient(180deg, rgba(238,241,245,0.96), rgba(238,241,245,0.88));
  backdrop-filter: blur(10px);
}
.tile {
  text-align: left; border: 1px solid var(--line); background: #fff;
  border-radius: 16px; padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow);
}
.tile:hover { border-color: var(--navy); }
.tile-k { display: block; color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.tile strong { font-size: 1.6rem; letter-spacing: -0.04em; }
.tile-hot { background: linear-gradient(160deg, #fff8e8, #fff); border-color: #f1d08a; }
.filters {
  display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 10px 12px;
  padding: 8px 24px 16px; position: sticky; top: 178px; z-index: 29;
  background: rgba(238,241,245,0.94); border-bottom: 1px solid var(--line);
}
.filters label { font-size: 12px; font-weight: 700; color: var(--muted); }
.filters input, .filters select {
  width: 100%; margin-top: 5px; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 10px; font: inherit; background: #fff;
}
.filter-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; padding-bottom: 2px; }
.go.compact, .ghost.compact { width: auto; margin: 0; padding: 10px 14px; }
.table-wrap {
  padding: 0 24px 40px; overflow: auto; max-height: calc(100vh - 290px);
}
table.lots { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 16px; overflow: hidden; }
table.lots th, table.lots td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13.5px; vertical-align: top; }
table.lots th {
  position: sticky; top: 0; z-index: 5;
  background: #163a5c; color: #fff; font-size: 12px; letter-spacing: 0.02em;
}
table.lots tbody tr { cursor: pointer; }
table.lots tbody tr:hover { background: #f6f9fc; }
table.lots tr.hot { background: #fff9ec; }
.subj { max-width: 280px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 28px !important; }
.pill { display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 800; background: #eef3f8; }
.pill-new { background: #e8f1fb; color: var(--navy); }
.pill-watching { background: #fff4d6; color: #8a5a00; }
.pill-take { background: #e4f7ea; color: #157a3a; }
.pill-reject { background: #fde8e6; color: #b42318; }
.pill-done { background: #eceff3; color: #445; }
.score { display: inline-flex; align-items: center; gap: 6px; width: 88px; }
.score i { display: block; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--navy), var(--amber)); }
.score em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 700; }
.drawer-bg { position: fixed; inset: 0; background: rgba(16, 28, 42, 0.35); z-index: 50; display: none; }
.drawer-bg.open { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(560px, 100%);
  background: #fff; z-index: 60; box-shadow: -20px 0 50px rgba(16,28,42,0.18);
  display: none; flex-direction: column;
}
.drawer.open { display: flex; }
.drawer-top {
  display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff;
}
.drawer-top h2 { font-size: 1.15rem; line-height: 1.3; }
.drawer-body { padding: 18px 20px 32px; overflow: auto; }
.lead-card { font-weight: 800; margin-bottom: 8px; }
.why { background: #f6f9fc; border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.block { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.block h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.contacts { list-style: none; }
.contacts li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.status-row, .drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.muted { color: var(--muted); }
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, 1fr); position: static; }
  .filters { grid-template-columns: repeat(2, 1fr); position: static; }
  .table-wrap { max-height: none; }
  .grid-2 { grid-template-columns: 1fr; }
}
