/* ============ Страница заказа ============ */

.order-wrap { max-width: 780px; margin: 0 auto; padding: 56px 24px 80px; }
.order-sub { color: var(--text-soft); font-size: 16px; max-width: 62ch; }

.order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-top: 24px;
}
.order-card h2 { font-size: 20px; margin-bottom: 8px; }
.order-hint { color: var(--text-soft); font-size: 14.5px; max-width: 66ch; }
.order-note { font-size: 12.5px; color: var(--text-soft); margin: 10px 0 0; }
.order-fine {
  font-size: 12.5px;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 24px;
}

#input-text {
  width: 100%;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--text);
  margin-top: 14px;
  resize: vertical;
}
#input-text:focus { outline: 2px solid var(--ink); border-color: var(--ink); }
#input-form .btn { margin-top: 14px; }

/* Загрузка выписки: файл разбирается в браузере */
#statement { margin-top: 18px; }
.statement-zone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 26px 20px;
  text-align: center;
  background: var(--paper);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.statement-zone.is-over { border-color: var(--green); background: rgba(0, 200, 120, 0.06); }
.statement-zone-head { font-weight: 700; font-size: 15.5px; margin: 0; }
.statement-zone-sub { font-size: 13.5px; color: var(--text-soft); margin: 6px 0 14px; }
.statement-zone label { cursor: pointer; }

.statement-privacy { font-size: 12.5px; color: var(--text-soft); margin: 10px 0 0; max-width: 68ch; }
.statement-status {
  font-size: 14px;
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 200, 120, 0.1);
}
.statement-status.is-error { background: rgba(220, 60, 60, 0.1); }

.statement-facts {
  display: grid;
  grid-template-columns: minmax(140px, auto) 1fr;
  gap: 0;
  margin: 18px 0 0;
  font-size: 14.5px;
}
.statement-facts dt { color: var(--text-soft); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.statement-facts dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 600; }

.statement-flags { list-style: none; padding: 0; margin: 16px 0 0; }
.statement-flags .flag {
  font-size: 14px;
  line-height: 1.6;
  padding: 10px 14px;
  border-left: 3px solid var(--line);
  margin-bottom: 8px;
  background: var(--paper);
}
.statement-flags .flag-alert { border-left-color: #d94141; }
.statement-flags .flag-watch { border-left-color: #e0a800; }
.statement-flags .flag-ok { border-left-color: var(--green); }

/* Прогресс: шаги появляются по мере работы воркера */
.order-steps { list-style: none; padding: 0; margin: 20px 0 0; }
.order-steps li {
  position: relative;
  padding: 9px 0 9px 30px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.order-steps li::before {
  content: '✓';
  position: absolute; left: 4px;
  color: var(--green);
  font-weight: 800;
}
.order-steps li:last-child { border-bottom: none; }
.order-steps li:last-child::before {
  content: '';
  width: 12px; height: 12px;
  border: 2px solid var(--green);
  border-top-color: transparent;
  border-radius: 50%;
  top: 13px;
  animation: order-spin 0.8s linear infinite;
}
@keyframes order-spin { to { transform: rotate(360deg); } }

/* Тело отчёта */
.report { margin-top: 8px; }
.report h2 { font-size: 19px; margin: 28px 0 10px; }
.report h3 { font-size: 16px; margin: 20px 0 8px; }
.report p { font-size: 15.5px; line-height: 1.7; margin: 0 0 12px; }
.report li { font-size: 15.5px; line-height: 1.7; margin: 0 0 8px 20px; }

/* Таблицы в отчёте: на узком экране скроллится сама таблица, не страница */
.report-table-wrap { overflow-x: auto; margin: 0 0 16px; }
.report-table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.report-table th, .report-table td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}
.report-table th { background: var(--paper); font-weight: 700; }

.order-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

@media (max-width: 600px) {
  .order-wrap { padding: 32px 16px 60px; }
  .order-card { padding: 22px 20px; }
  .order-actions .btn { flex: 1; }
}

@media print {
  .site-header, .order-actions, #progress, #input-form { display: none; }
  .order-card { border: none; padding: 0; }
  body { background: #fff; }
}
