/* Дизайн-токены (§11 «Аркада»): нейтральная тёмная заготовка.
   Палитру/шрифты Семён собирает в claude.ai/design — итоговые токены
   лягут сюда, в :root, без переделки разметки. */
:root {
  --bg: #0f1115;
  --surface: #191c23;
  --surface-2: #22262f;
  --text: #e8eaf0;
  --muted: #8b91a0;
  --accent: #5b8cff;        /* заменить на брендовый градиент из claude.ai/design */
  --accent-2: #9b5bff;
  --ok: #3ecf8e;
  --warn: #ffb84d;
  --error: #ff5b6b;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: var(--error); }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px; background: var(--surface);
  border-bottom: 1px solid var(--surface-2);
}
.logo { font-weight: 700; letter-spacing: .02em; }
.topbar-right { display: flex; gap: 12px; align-items: center; }

#app { max-width: 900px; margin: 28px auto; padding: 0 16px; }
#mainnav {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 18px; background: var(--surface); padding: 10px 22px;
  border-radius: 999px; border: 1px solid var(--surface-2);
}

.card {
  background: var(--surface); border: 1px solid var(--surface-2);
  border-radius: var(--radius); padding: 22px; margin-bottom: 16px;
}
.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }

h1 { font-size: 1.3rem; margin: 0 0 14px; }
h2 { font-size: 1.05rem; margin: 18px 0 8px; }

label { display: block; margin-bottom: 12px; font-size: .9rem; color: var(--muted); }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid #303540; border-radius: 8px; font-size: 1rem;
}
button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border: 0; border-radius: 10px; padding: 10px 18px;
  font-size: .95rem; cursor: pointer; font-weight: 600;
}
button:hover { filter: brightness(1.1); }
button.ghost { background: transparent; border: 1px solid var(--surface-2); color: var(--muted); }
button:disabled { opacity: .5; cursor: default; }

.searchbar { display: flex; gap: 10px; margin-bottom: 18px; }
.searchbar input { flex: 1; margin-top: 0; }

.deal-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-radius: 10px; background: var(--surface-2);
  margin-top: 8px; cursor: pointer;
}
.deal-row:hover { outline: 1px solid var(--accent); }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .78rem; background: var(--surface-2); color: var(--muted);
}

/* Вехи производства — игровая линейка (§11) */
.milestones { display: flex; gap: 6px; margin: 14px 0; flex-wrap: wrap; }
.milestone {
  flex: 1; min-width: 100px; text-align: center; padding: 10px 6px;
  border-radius: 10px; background: var(--surface-2); color: var(--muted);
  font-size: .82rem; border: 1px solid transparent;
}
.milestone.done { background: rgba(62, 207, 142, .12); color: var(--ok); border-color: var(--ok); }
.milestone.current {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700;
}
.milestone.clickable { cursor: pointer; }
.milestone.clickable:hover { border-color: var(--accent); }

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

.doc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: var(--surface-2); border-radius: 8px; margin-top: 6px;
}
.doc-actions { display: flex; gap: 8px; }
.doc-actions button { padding: 5px 12px; font-size: .82rem; }

.qa-answer {
  background: var(--surface-2); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 12px 14px; margin-top: 10px; white-space: pre-wrap;
}
.citation { font-size: .82rem; color: var(--muted); margin-top: 6px; }

.upload-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.upload-row label { flex: 1; min-width: 160px; margin-bottom: 0; }

/* Канбан активных сделок (вехи производства = колонки) */
.kanban { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col {
  flex: 1; min-width: 170px; background: var(--surface);
  border: 1px solid var(--surface-2); border-radius: var(--radius); padding: 10px;
}
.kanban-col h3 { font-size: .85rem; color: var(--muted); margin: 0 0 8px; text-align: center; }
.kanban-col.dragover { outline: 2px dashed var(--accent); }
.kanban-card {
  background: var(--surface-2); border-radius: 10px; padding: 8px 10px;
  margin-bottom: 8px; cursor: pointer; font-size: .85rem;
}
.kanban-card:hover { outline: 1px solid var(--accent); }
.kanban-card .muted { display: block; font-size: .78rem; }
.kanban-card[draggable="true"] { cursor: grab; }

/* Зона мультизагрузки */
.dropzone {
  border: 2px dashed #303540; border-radius: 10px; padding: 18px;
  text-align: center; color: var(--muted); margin-top: 10px; cursor: pointer;
}
.dropzone.dragover { border-color: var(--accent); color: var(--text); }
.upload-progress { font-size: .85rem; margin-top: 6px; }

.citation.clickable { cursor: pointer; color: var(--accent); }
.citation.clickable:hover { text-decoration: underline; }
