:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --line: #dce3e6;
  --text: #172026;
  --muted: #66737b;
  --accent: #0f766e;
  --accent-dark: #0b5e58;
  --warn: #ad5f00;
  --danger: #a33a3a;
  --ok: #287947;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
p { margin: 6px 0 0; color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
  padding: 16px;
}

.workspace { min-width: 0; }
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.search {
  display: flex;
  flex: 1;
  gap: 8px;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  background: var(--accent);
  color: white;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

button:hover { background: var(--accent-dark); }
button.secondary {
  background: #e8eeee;
  color: var(--text);
}

.split {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
}

.panel, .details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel { min-height: 280px; }
.details {
  padding: 16px;
  min-height: calc(100vh - 112px);
  position: sticky;
  top: 16px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head span, .status-pill {
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
}

.list { padding: 10px; display: grid; gap: 10px; }
.tender, .card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.tender strong, .card strong { display: block; margin-bottom: 6px; }
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  padding: 10px;
  overflow-x: auto;
}

.column {
  min-height: 220px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.column h3 {
  margin-bottom: 10px;
  color: var(--muted);
}

.card { cursor: pointer; margin-bottom: 8px; }
.card.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(15, 118, 110, .12); }

.empty {
  color: var(--muted);
  padding: 16px 0;
}

.section {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.section:last-child { border-bottom: 0; }
.stack { display: grid; gap: 8px; margin-top: 10px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.note {
  padding: 10px;
  border-radius: 6px;
  background: #f4f7f7;
  color: var(--muted);
  font-size: 13px;
  white-space: pre-wrap;
}

.bad { color: var(--danger); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.doclink {
  display: block;
  color: var(--accent);
  text-decoration: none;
  margin: 6px 0;
}

@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr; }
  .details { position: static; min-height: auto; }
}

@media (max-width: 820px) {
  .topbar, .toolbar, .split { display: block; }
  .search { margin-bottom: 8px; }
  .split .panel { margin-bottom: 16px; }
  .kanban { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}
