:root {
  --bg: #0b0d10;
  --card: #14181d;
  --line: #232830;
  --ink: #eef2f6;
  --dim: #8d97a3;
  --accent: #4bb3f0;
  --accent-deep: #1f7fbf;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 50% -10%, #16202b 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.start {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.logo {
  width: 108px;
  height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(75, 179, 240, 0.25));
}

h1 { font-size: 34px; letter-spacing: -0.02em; }
.lede { color: var(--dim); font-size: 15px; }
.foot { color: #5d6672; font-size: 13px; }
.version { color: #454d58; font-size: 12px; }

.gate {
  margin-top: 10px;
  width: min(430px, 92vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}

.primary {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--accent), var(--accent-deep));
  color: #06121b;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.primary:hover { filter: brightness(1.06); }

.split {
  width: min(920px, 94vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

.about {
  padding: 44px 36px;
  background: linear-gradient(160deg, rgba(75, 179, 240, 0.14), transparent 70%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.about h2 { font-size: 30px; letter-spacing: 0.01em; }
.about p { color: var(--dim); font-size: 14px; line-height: 1.6; max-width: 34ch; }

form { padding: 40px 34px; display: flex; flex-direction: column; gap: 14px; }
form h3 { font-size: 21px; margin-bottom: 4px; }
label { font-size: 13px; color: var(--dim); }

input {
  width: 100%;
  padding: 12px 13px;
  background: #0e1216;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #5d6672;
  font-size: 12px;
  margin: 6px 0;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.tg {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #2ea6de;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.tg:hover { filter: brightness(1.06); }

.error {
  min-height: 18px;
  font-size: 13px;
  color: #ff8f8f;
}

.picker {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: min(760px, 92vw);
}
@media (max-width: 700px) { .picker { grid-template-columns: 1fr; } }

.dept {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  padding: 26px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.dept:hover { border-color: var(--accent); transform: translateY(-2px); }
.dept-name { color: var(--ink); font-size: 19px; font-weight: 700; }

/* Кнопка в карточке — сдержаннее заливки: контур с лёгкой подсветкой, чтобы не давила. */
.dept a.primary {
  display: inline-block;
  width: auto;
  min-width: 148px;
  padding: 9px 26px;
  border: 1px solid rgba(75, 179, 240, 0.55);
  border-radius: 9px;
  background: rgba(75, 179, 240, 0.1);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.dept a.primary:hover {
  background: rgba(75, 179, 240, 0.9);
  border-color: transparent;
  color: #06121b;
  filter: none;
}

/* ── рабочий раздел ─────────────────────────────────────────────── */
body.app {
  display: block;
  align-items: stretch;
  padding: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 16, 0.85);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 700; }
.brand .mark { width: 30px; height: 30px; object-fit: contain; }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--dim); }

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
}
.chip.ok { color: #7fd08a; border-color: rgba(127, 208, 138, 0.35); }
.chip.warn { color: #e5c06b; border-color: rgba(229, 192, 107, 0.35); }

.ghost {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.ghost:hover { border-color: var(--accent); color: var(--accent); }
.ghost.small { padding: 5px 10px; font-size: 12px; }
.ghost.ok:hover { border-color: #7fd08a; color: #7fd08a; }
.ghost.danger:hover { border-color: #ff8f8f; color: #ff8f8f; }

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
  align-items: start;
}
@media (max-width: 1000px) { .board { grid-template-columns: 1fr; } }

.col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.col-head h2 { font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim); }
.list { display: flex; flex-direction: column; gap: 12px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-title { font-size: 15px; font-weight: 700; }
.card-meta { font-size: 12px; color: var(--dim); }
.card-text { font-size: 13px; color: #b9c2cd; white-space: pre-wrap; line-height: 1.5; }
.card-note { font-size: 12px; color: #e5c06b; }
.empty { color: #5d6672; font-size: 13px; padding: 10px 2px; }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.check-text { flex: 1; font-size: 13px; }
.check.ok .check-text { color: #7fd08a; }
.check.fail .check-text { color: #ff8f8f; }

.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.shots { display: flex; flex-wrap: wrap; gap: 8px; }
.shot { font-size: 12px; color: var(--accent); text-decoration: none; border-bottom: 1px dashed rgba(75,179,240,0.4); }

dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  padding: 0;
  width: min(520px, 92vw);
}
dialog::backdrop { background: rgba(4, 6, 9, 0.72); }
dialog form { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
dialog h3 { font-size: 18px; }
dialog label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dim); }
dialog input, dialog textarea, dialog select {
  width: 100%;
  padding: 10px 12px;
  background: #0e1216;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
}
dialog menu { display: flex; justify-content: flex-end; gap: 10px; padding: 0; }
dialog .primary { width: auto; padding: 10px 22px; }
