/* Outreach Hub — стиль «дизайнерский брутализм»: чёрная сетка, капс-метки,
   жирные Archivo-цифры, один оранжевый акцент. */
:root {
  --ink: #111111;
  --paper: #ffffff;
  --gray: #777777;
  --faint: #aaaaaa;
  --hair: #e6e6e3;
  --accent: #e4572e;
  --tint: #fff6f3;
  --ok: #1c6b43;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0; min-height: 100vh;
  font: 14px/1.5 'Archivo', 'Segoe UI', system-ui, sans-serif;
  background: var(--paper); color: var(--ink);
}
.mono { font-family: 'Spline Sans Mono', Consolas, monospace; }
a { color: var(--ink); } a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0; }

/* ---------- каркас ---------- */
#app { display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 24px; border-bottom: 2px solid var(--ink);
  background: var(--paper); position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; letter-spacing: -0.2px; }
.brand::before { content: ''; width: 10px; height: 10px; background: var(--accent); }
.topbar select {
  font: inherit; font-weight: 600; border: 0; border-bottom: 1px solid var(--ink);
  padding: 2px 0; background: transparent; color: var(--ink); width: auto;
}
.topbar select:focus { outline: none; border-bottom-color: var(--accent); }
.quota { font-family: 'Spline Sans Mono', monospace; font-size: 12.5px; color: var(--gray); }
.quota b { color: var(--ink); }
.grow { flex: 1; }

.shell { display: flex; flex: 1; min-height: 0; }
.sidebar {
  width: 190px; flex: none; border-right: 1px solid var(--ink);
  padding: 22px 0 18px 24px; display: flex; flex-direction: column; gap: 2px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  font-size: 11.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  color: #666666; cursor: pointer; text-decoration: none; border: 0; background: none; text-align: left; font-family: inherit;
}
.nav-item:hover { color: var(--ink); }
.nav-item.active { font-weight: 800; color: var(--ink); }
.nav-item.active::before { content: ''; width: 6px; height: 6px; background: var(--accent); }
.nav-item .count { font-family: 'Spline Sans Mono', monospace; font-size: 11px; color: var(--gray); letter-spacing: 0; }
.sidebar .foot { margin-top: auto; padding-right: 18px; font-size: 10.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); line-height: 1.9; }

main { flex: 1; min-width: 0; padding: 22px 28px 60px; }

/* ---------- типовые элементы ---------- */
.caps { font-size: 11px; font-weight: 700; letter-spacing: 0.9px; text-transform: uppercase; color: var(--faint); }
.rule { border-top: 2px solid var(--ink); margin: 10px 0 0; }
.muted { color: var(--gray); }
.err { color: var(--accent); font-weight: 600; }

button, .btn {
  font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer;
  background: var(--ink); color: #ffffff; border: 1px solid var(--ink);
  padding: 9px 16px; border-radius: 0;
}
button:hover { background: #333333; }
button.ghost { background: transparent; color: var(--ink); }
button.ghost:hover { background: var(--tint); border-color: var(--accent); color: var(--ink); }
button.accent { background: var(--accent); border-color: var(--accent); }
button.accent:hover { background: #c8481f; }
button.mini { padding: 4px 10px; font-size: 12px; }
button:disabled { opacity: 0.4; cursor: default; }

input, select, textarea {
  font: inherit; color: var(--ink); width: 100%;
  border: 0; border-bottom: 1px solid var(--ink); background: transparent;
  padding: 7px 2px; border-radius: 0;
}
textarea { border: 1px solid var(--hair); padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
label { display: block; margin: 14px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.9px; text-transform: uppercase; color: var(--faint); }

.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.col { flex: 1 1 160px; }

/* чипы статусов */
.chip { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 2px 9px; white-space: nowrap; }
.chip.outline { border: 1px solid var(--ink); font-weight: 700; letter-spacing: 0.6px; }
.chip.fill { background: var(--ink); color: #ffffff; padding: 4px 9px; }
.chip.accent { border: 1px solid var(--accent); color: var(--accent); font-weight: 700; }
.chip.plain { color: var(--gray); padding: 2px 0; }
.chip.ok { border: 1px solid var(--ok); color: var(--ok); font-weight: 700; }

/* счётчики-воронка */
.counters { display: flex; align-items: baseline; gap: 26px; flex-wrap: wrap; }
.counters .c { display: flex; align-items: baseline; gap: 7px; }
.counters .n { font-weight: 800; font-size: 28px; }
.counters .n.hot { color: var(--accent); }
.counters .t { font-size: 12px; color: var(--gray); }

/* сетка больших чисел на дашборде */
.statgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink); }
.statgrid .cell { padding: 18px 20px; border-right: 1px solid var(--ink); }
.statgrid .cell:last-child { border-right: 0; }
.statgrid .big { font-weight: 800; font-size: 42px; line-height: 1; }
.statgrid .big.hot { color: var(--accent); }
.statgrid .sub { font-size: 12px; color: var(--gray); margin-top: 8px; }
.statgrid .note { font-size: 11.5px; margin-top: 2px; }

/* списки-таблицы */
.list { display: flex; flex-direction: column; }
.trow {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 4px; border-bottom: 1px solid var(--ink);
  cursor: pointer; background: transparent;
}
.trow:hover { background: var(--tint); }
.trow.open { background: var(--tint); }
.trow.dim { color: var(--faint); }
.trow .score { font-weight: 800; font-size: 17px; min-width: 44px; }
.trow .handle { font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.trow .bio { flex: 1; font-size: 13.5px; color: var(--gray); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.trow .time { font-family: 'Spline Sans Mono', monospace; font-size: 12.5px; color: var(--gray); min-width: 88px; }

.avatar {
  width: 36px; height: 36px; flex: none; border: 1px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; background: var(--av, #e8e3da);
  background-size: cover; background-position: center;
}
.avatar.lg { width: 64px; height: 64px; font-size: 20px; }

/* секции с заголовком-линейкой */
.section { margin-top: 26px; }
.sec-head { display: flex; align-items: baseline; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.sec-head h2 { font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.sec-head .muted { font-size: 12px; }

/* правая панель (карточка лида) */
.split { display: flex; gap: 0; align-items: stretch; }
.split .left { flex: 1; min-width: 0; }
.panel {
  width: 400px; flex: none; border-left: 2px solid var(--ink);
  padding: 20px 0 20px 24px; margin-left: 24px;
  display: flex; flex-direction: column; gap: 13px;
}
.panel .close { cursor: pointer; color: var(--gray); font-size: 16px; background: none; border: 0; padding: 0 4px; }
.panel .close:hover { color: var(--accent); background: none; }
.kv { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--ink); padding: 6px 0; }
.kv .k { font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--gray); min-width: 70px; }
.kv input { border-bottom: 0; padding: 0; }
.seg { display: flex; border: 1px solid var(--ink); }
.seg > * { flex: 1; text-align: center; padding: 9px 0; font-weight: 600; font-size: 13px; cursor: pointer; border: 0; background: transparent; color: var(--ink); font-family: inherit; }
.seg > * + * { border-left: 1px solid var(--ink); }
.seg > .on { background: var(--ink); color: #ffffff; }
.seg > *:hover:not(.on) { background: var(--tint); }

/* формы-карточки */
.formcard { border: 1px solid var(--ink); padding: 18px 20px; margin-top: 14px; }
.hint { font-size: 12px; color: var(--gray); line-height: 1.55; }
code { font-family: 'Spline Sans Mono', monospace; font-size: 12px; background: var(--tint); padding: 1px 5px; }

/* логин */
#login { position: fixed; inset: 0; background: var(--paper); display: flex; align-items: center; justify-content: center; z-index: 100; }
#login[hidden], #app[hidden] { display: none; }
.login-card { width: 340px; border: 2px solid var(--ink); padding: 34px; display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.login-card h1::before { content: ''; width: 12px; height: 12px; background: var(--accent); }

.kbd-hints { display: flex; gap: 18px; margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--ink); font-size: 11px; letter-spacing: 0.4px; color: var(--faint); }

@media (max-width: 900px) {
  .sidebar { width: 60px; padding-left: 12px; }
  .nav-item span.txt { display: none; }
  .panel { width: 100%; border-left: 0; border-top: 2px solid var(--ink); margin: 20px 0 0; padding: 20px 0 0; }
  .split { flex-direction: column; }
  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statgrid .cell:nth-child(2) { border-right: 0; }
  .trow .bio { display: none; }
}
