:root {
  font-family: Manrope, sans-serif;
  color: #111;
  background: #fff;
  font-synthesis: none;
  --blue: #218dff;
  --soft: #eef5ff;
  --muted: #718097;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  /* декоративные треугольники выходят за край — без горизонтальной прокрутки */
  overflow-x: clip;
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
a {
  color: var(--blue);
}
:focus-visible {
  outline: 3px solid #81bdff;
  outline-offset: 3px;
}
.page {
  position: relative;
  max-width: 1120px;
  margin: auto;
  padding: 24px 0 0;
}
.header {
  height: 56px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #111;
  text-decoration: none;
  line-height: 1.1;
}
.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  flex: none;
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font-size: 13px;
  font-weight: 800;
}
.brand small {
  font-size: 9px;
  color: #8b96a4;
  margin-top: 4px;
}
.header-label {
  font-size: 12px;
  color: #7b8797;
}
.hero {
  position: relative;
  min-height: 310px;
  display: flex;
  align-items: center;
  padding: 50px 16px 52px;
  overflow: hidden;
}
.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
}
.eyebrow {
  display: block;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}
.hero h1 {
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 18px 0;
  font-weight: 800;
}
.hero p {
  font-size: 16px;
  line-height: 1.6;
  color: #65748a;
  max-width: 490px;
  margin: 0;
}
/* картинка — слоем под контентом: карточки ложатся поверх, как на сайте */
main {
  position: relative;
  z-index: 1;
}
.header {
  position: relative;
  z-index: 2;
}
.hero-art {
  position: absolute;
  z-index: 0;
  right: 20px;
  top: 10px;
  width: 300px;
  height: 470px;
  pointer-events: none;
  overflow: visible;
}
/* скругление углов, как на сайте: обводка того же цвета с круглыми стыками */
.tri {
  fill: url(#tri-blue);
  stroke: url(#tri-blue);
  stroke-width: 70;
  stroke-linejoin: round;
}
.tri-lines {
  fill: none;
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1.4;
}
.tri-small {
  transform-box: fill-box;
  transform-origin: center;
  animation: breathe 4s ease-in-out infinite alternate;
}
@keyframes breathe {
  from {
    transform: scale(0.94) rotate(-3deg);
  }
  to {
    transform: scale(1.06) rotate(4deg);
  }
}
/* бледный треугольник за заголовком, как фон на сайте */
.hero-ghost {
  position: absolute;
  z-index: 0;
  left: -160px;
  top: 40px;
  width: 560px;
  height: 480px;
  pointer-events: none;
  fill: #f3f6fa;
  stroke: #f3f6fa;
  stroke-width: 80;
  stroke-linejoin: round;
}
.workspace {
  padding: 0 16px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-heading h2,
.card-heading h2 {
  font-size: 24px;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin: 8px 0 0;
}
.section-heading > p {
  font-size: 12px;
  color: #8a96a6;
  margin: 0 0 3px;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.tab {
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  background: var(--soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}
.tab:hover,
.secondary:hover {
  background: #dcecff;
}
.tab[aria-selected="true"] {
  background: var(--blue);
  color: #fff;
}
.card {
  background: #fff;
  border: 1px solid #e6ecf5;
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(31, 64, 107, 0.06);
  padding: 28px;
  margin-bottom: 24px;
}
.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.number {
  color: #dce9f9;
  font-size: 26px;
  font-weight: 800;
}
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.setup-description {
  margin: 10px 0 24px;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}
input {
  height: 44px;
  border: 1px solid #dce5f0;
  border-radius: 6px;
  padding: 0 14px;
  color: #111;
  min-width: 0;
  background: #fff;
}
input::placeholder {
  color: #a4afbd;
}
.brand-form {
  display: flex;
  gap: 10px;
  max-width: 680px;
}
.brand-form input {
  flex: 1;
}
.button {
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 0 22px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-decoration: none;
}
.primary {
  background: var(--blue);
  color: #fff;
}
.primary:hover {
  background: #1478e6;
}
.secondary {
  background: var(--soft);
  color: var(--blue);
}
.site-note,
.feedback,
.hint {
  font-size: 12px;
  color: #8995a4;
  line-height: 1.5;
}
.site-note:empty,
.feedback:empty,
.error:empty {
  display: none;
}
.feedback {
  color: #52677f;
}
.spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid #cde3ff;
  border-top-color: var(--blue);
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 8px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.error {
  color: #c43b43;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.categories {
  border-top: 1px solid #edf1f6;
  margin-top: 24px;
  padding-top: 22px;
}
.category-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: start;
}
.category-heading h3 {
  font-size: 15px;
  margin: 0;
}
.category-heading p {
  margin: 4px 0 12px;
}
.text-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.text-actions button {
  border: 0;
  background: none;
  padding: 2px 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
.filter-label input {
  width: 100%;
  margin: 8px 0 12px;
}
.category-list {
  max-height: 290px;
  overflow: auto;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  padding: 5px 12px;
}
.category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  font-size: 13px;
  padding: 6px 0;
}
.category-item input {
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--blue);
  margin: 0;
}
.category-item span {
  overflow-wrap: anywhere;
}
.count {
  color: #97a2b1;
  font-size: 12px;
}
.hint {
  margin: 10px 0 0;
}
.collect-row {
  border-top: 1px solid #edf1f6;
  margin-top: 24px;
  padding-top: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.collect-row .button {
  min-width: 155px;
}
.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}
.progress-title {
  font-size: 22px;
  letter-spacing: -0.03em;
  margin: 8px 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  background: #f0f3f7;
  color: #667488;
}
.badge.paused {
  background: #fff6e5;
  color: #b7791f;
}
.badge.running {
  background: #eaf4ff;
  color: #218dff;
}
.badge.done {
  background: #e8f7ee;
  color: #238456;
}
.badge.failed,
.badge.interrupted {
  background: #fff0f0;
  color: #c43b43;
}
.badge.cancelled {
  background: #f1f3f6;
  color: #748092;
}
.job-meta {
  color: #718097;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.timer {
  font-size: 13px;
  color: #65748a;
  white-space: nowrap;
}
.stepper {
  display: flex;
  gap: 4px;
  margin: 24px 0;
  overflow-x: auto;
  padding-bottom: 5px;
}
.step {
  flex: 1;
  min-width: 92px;
  color: #a0acbb;
  font-size: 10px;
  font-weight: 700;
}
.step:before {
  content: "";
  display: block;
  height: 4px;
  background: #e9eef5;
  border-radius: 4px;
  margin-bottom: 9px;
}
.step.current,
.step.complete {
  color: var(--blue);
}
.step.current:before,
.step.complete:before {
  background: var(--blue);
}
.log-heading {
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 10px;
}
.log {
  height: 220px;
  overflow: auto;
  background: #f7f9fc;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  padding: 8px;
}
.log-entry {
  display: grid;
  grid-template-columns: 18px 64px minmax(0, 1fr);
  gap: 5px;
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 5px;
}
.log-entry time {
  color: #9aa6b5;
}
.log-entry .log-text {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.log-icon {
  font-weight: 800;
  color: #9aa6b5;
}
.log-entry.ok .log-icon {
  color: #2b9b64;
}
.log-entry.warn .log-icon {
  color: #d99222;
}
.log-entry.error-level .log-icon {
  color: #d34b54;
}
.log-entry.action {
  background: #e7f2ff;
  color: #176dc5;
  font-weight: 800;
}
.log-entry.action .log-icon {
  color: var(--blue);
}
.progress-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.result-name {
  color: #718097;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.error-note {
  background: #fff1f1;
  color: #b83842;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  white-space: pre-wrap;
  margin-top: 18px;
}
.history {
  margin: 44px 0 60px;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
.history-table th {
  color: #929eae;
  font-size: 11px;
  font-weight: 700;
  padding: 12px;
}
.history-table td {
  border-top: 1px solid #edf1f6;
  padding: 14px 12px;
}
.history-table tbody tr {
  cursor: pointer;
}
.history-table tbody tr:hover {
  background: #f7faff;
}
.history-table a {
  font-weight: 700;
  text-decoration: none;
}
.empty {
  color: #8995a4;
  font-size: 13px;
  padding: 22px 0;
}
.table-wrap {
  overflow-x: auto;
}
footer {
  border-top: 1px solid #edf1f6;
  padding: 24px 16px 35px;
  font-size: 12px;
  font-weight: 800;
}
footer span {
  font-weight: 500;
  color: #a1acba;
  margin-left: 15px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 700px) {
  .page {
    padding-top: 16px;
  }
  .header {
    margin: 0 16px;
  }
  .header-label {
    display: none;
  }
  .hero {
    min-height: 260px;
    padding: 45px 16px;
  }
  .hero h1 {
    font-size: 30px;
  }
  .hero p {
    font-size: 14px;
    max-width: 75%;
  }
  .hero-art {
    right: -110px;
    opacity: 0.3;
  }
  .hero-ghost {
    display: none;
  }
  .section-heading > p {
    display: none;
  }
  .section-heading h2,
  .card-heading h2 {
    font-size: 21px;
  }
  .card {
    padding: 20px;
  }
  .brand-form {
    flex-direction: column;
  }
  .brand-form input {
    flex: none;
  }
  .brand-form .button {
    align-self: stretch;
  }
  .category-heading {
    flex-direction: column;
    gap: 2px;
  }
  .text-actions {
    margin-bottom: 12px;
  }
  .history-table {
    min-width: 500px;
  }
  .progress-top {
    flex-wrap: wrap;
  }
  .stepper {
    margin: 20px 0;
  }
  .log-entry {
    grid-template-columns: 16px 56px minmax(0, 1fr);
    font-size: 11px;
  }
  .tabs {
    gap: 6px;
  }
  .tab {
    padding: 10px 15px;
  }
  footer span {
    display: block;
    margin: 8px 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

.indent {
  display: block;
  flex: 0 0 6px;
  width: 6px;
}

/* Широкий экран: работа на первом экране — форма слева, ход сбора справа */
@media (min-width: 1200px) {
  .page {
    max-width: 1440px;
    padding-left: 24px;
    padding-right: 24px;
  }
  .hero {
    min-height: 0;
    padding: 20px 16px 22px;
  }
  .hero h1 {
    font-size: 34px;
    margin: 8px 0;
  }
  .hero p {
    max-width: none;
  }
  .section-heading {
    margin-bottom: 14px;
  }
  .tabs {
    margin-bottom: 18px;
  }
  .hero-art {
    right: 70px;
    top: 0;
    width: 260px;
    height: 410px;
  }
  #panel:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  #panel .setup-card,
  #panel #progress > * {
    margin-bottom: 0;
  }
  #panel:has(#progress:empty) .setup-card {
    grid-column: 1 / -1;
  }
  #progress {
    position: sticky;
    top: 16px;
  }
  #progress .log {
    /* лог тянется под высоту окна, чтобы кнопка «Скачать» оставалась на экране */
    height: clamp(200px, calc(100vh - 750px), 560px);
  }
  #progress .step {
    min-width: 64px;
  }
  .workspace > .section-heading > p {
    display: none;
  }
  .history {
    grid-column: 1 / -1;
    margin-top: 16px;
  }
  .category-list {
    max-height: 360px;
  }
}

/* ---------- вход, шапка, табличка «занято», сотрудники ---------- */
.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-button {
  border: 1px solid #dce5f0;
  background: #fff;
  color: #3a4a5e;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
}
a.header-button {
  text-decoration: none;
}
.header-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.occupancy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #bfe8cf;
  background: #effaf3;
  color: #17803d;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
}
.occupancy-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22a352;
}
.occupancy.busy {
  border-color: #f4c3c6;
  background: #fdf0f1;
  color: #c43b43;
}
.occupancy.busy .occupancy-dot {
  background: #e0434d;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
dialog {
  border: 0;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(17, 34, 58, 0.25);
  max-width: min(520px, calc(100vw - 32px));
  width: 100%;
  color: #111;
}
dialog::backdrop {
  background: rgba(17, 34, 58, 0.45);
}
.sign-dialog {
  text-align: center;
}
.sign {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 22px 48px;
  color: #fff;
  transition: background 0.4s;
}
.sign.busy {
  background: #e0434d;
}
.sign.free {
  background: #22a352;
}
.sign h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sign-light {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.25);
}
.sign.busy .sign-light {
  animation: pulse 1.4s ease-in-out infinite;
}
.sign-text {
  font-size: 15px;
  font-weight: 700;
  margin: 22px 0 6px;
  line-height: 1.5;
}
.sign-detail {
  margin: 0 0 22px;
}
.dialog-actions {
  display: flex;
  justify-content: center;
}
.staff-dialog {
  max-width: min(600px, calc(100vw - 32px));
}
.staff-dialog h2 {
  margin: 4px 0 0;
}
.staff-dialog h3 {
  font-size: 14px;
  margin: 24px 0 12px;
}
.staff-form {
  display: flex;
  flex-direction: column;
}
.staff-form > input,
.staff-form .brand-form {
  margin-bottom: 14px;
}
.staff-form > .button {
  align-self: flex-start;
}
.staff-created {
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  background: #effaf3;
  font-size: 13px;
}
.staff-created p {
  margin: 0 0 8px;
}
.staff-created pre {
  margin: 0 0 12px;
  font: 600 13px/1.6 ui-monospace, monospace;
  white-space: pre-wrap;
  user-select: all;
}
.staff-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.staff-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #edf1f6;
}
.staff-login {
  font-weight: 700;
  flex: 1;
}
.login-main {
  display: flex;
  justify-content: center;
  padding: 64px 16px;
}
.login-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
}
.login-card .login-title {
  font-size: 22px;
  margin: 8px 0 4px;
}
.login-card input {
  margin-bottom: 16px;
}
.login-card .button {
  margin-top: 8px;
}
@media (max-width: 640px) {
  .header-tools {
    gap: 6px;
  }
  .header-tools #me {
    display: none;
  }
  dialog {
    padding: 20px;
  }
}
