/* ============================================================
   Пошаговая анкета Etavisa
   ============================================================ */

.apply {
  border: 1px solid var(--line); border-radius: var(--r-xl);
  background: var(--paper); box-shadow: var(--shadow);
  overflow: hidden;
}

/* ---- Прогресс ---- */
.apply__progress { border-bottom: 1px solid var(--line); background: var(--paper-2); padding: 20px 28px; }
.apply__bar { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 16px; }
.apply__bar i { display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #6d5bff);
  transition: width .45s var(--ease); }

.apply__steps { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.apply__steps::-webkit-scrollbar { display: none; }
.apply__step {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  border-radius: 999px; font-size: 13.5px; color: var(--ink-400);
  white-space: nowrap; flex: none; border: 1px solid transparent;
  background: none; cursor: default;
}
.apply__step i {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-style: normal;
  font-size: 12px; font-weight: 700;
  background: var(--paper-3); color: var(--ink-400);
}
.apply__step.is-done { color: var(--ink-700); cursor: pointer; }
.apply__step.is-done i { background: var(--ok); color: #fff; }
.apply__step.is-current { color: var(--accent-600); background: var(--accent-100); font-weight: 600; }
.apply__step.is-current i { background: var(--accent); color: #fff; }

/* ---- Тело ---- */
.apply__body { padding: 32px 28px; }
.apply__pane { display: none; animation: paneIn .32s var(--ease); }
.apply__pane.is-active { display: block; }
@keyframes paneIn { from { opacity: 0; transform: translateX(12px) } to { opacity: 1; transform: none } }

.apply__title { font-size: 24px; margin-bottom: 6px; }
.apply__sub { color: var(--ink-500); font-size: 15.5px; margin-bottom: 26px; }

.apply__foot {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 28px; border-top: 1px solid var(--line); background: var(--paper-2);
}
.apply__foot .btn--ghost { margin-right: auto; }
.apply__saved { font-size: 13.5px; color: var(--ink-400); margin-right: auto; }
.apply__saved b { color: var(--ok); font-weight: 600; }

@media (max-width: 640px) {
  .apply__body { padding: 24px 18px; }
  .apply__progress { padding: 16px 18px; }
  .apply__foot { padding: 16px 18px; flex-wrap: wrap; }
  .apply__foot .btn { flex: 1 1 auto; justify-content: center; }
  .apply__saved { flex: 1 0 100%; margin: 0 0 8px; }
}

/* ---- Загрузка файлов ---- */
.drop {
  border: 2px dashed var(--line-strong); border-radius: var(--r);
  padding: 28px 20px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s; background: var(--paper-2);
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-100); }
.drop input { display: none; }
.drop__icon { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 12px;
  background: var(--paper); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.drop__t { font-weight: 600; margin-bottom: 4px; }
.drop__d { font-size: 13.5px; color: var(--ink-400); }

.uploaded {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; background: var(--paper);
}
.uploaded__thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
  background: var(--paper-3); flex: none; }
.uploaded__name { font-size: 14.5px; font-weight: 550; word-break: break-all; }
.uploaded__meta { font-size: 13px; color: var(--ink-400); }
.uploaded__del { margin-left: auto; background: none; border: 0; cursor: pointer;
  color: var(--ink-400); padding: 8px; border-radius: 8px; }
.uploaded__del:hover { color: var(--danger); background: var(--danger-soft); }

.upload-progress { height: 4px; background: var(--line); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.upload-progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* ---- Сводка ---- */
.summary { display: grid; gap: 24px; }
.summary__block { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.summary__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; background: var(--paper-2); border-bottom: 1px solid var(--line);
  font-weight: 650; font-size: 14.5px;
}
.summary__head button { background: none; border: 0; color: var(--accent); cursor: pointer;
  font-size: 14px; font-weight: 600; padding: 0; }
.summary__rows { display: grid; }
.summary__row { display: flex; gap: 16px; padding: 11px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.summary__row:last-child { border-bottom: 0; }
.summary__row dt { color: var(--ink-500); flex: 0 0 46%; }
.summary__row dd { margin: 0; font-weight: 550; word-break: break-word; }
@media (max-width: 560px) {
  .summary__row { flex-direction: column; gap: 2px; }
  .summary__row dt { flex: none; font-size: 13.5px; }
}

.checkout {
  border: 1px solid var(--accent); border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--accent-100), var(--paper));
  padding: 26px;
}
.checkout__lines { display: grid; gap: 11px; margin-bottom: 18px; }
.checkout__line { display: flex; justify-content: space-between; gap: 14px; font-size: 15.5px; color: var(--ink-600, var(--ink-500)); }
.checkout__line b { color: var(--ink-900); font-weight: 600; }
.checkout__total { border-top: 1px solid rgba(47, 91, 255, .25); padding-top: 14px;
  font-size: 18px; color: var(--ink-900); font-weight: 650; }
.checkout__total b { font-size: 28px; letter-spacing: -.035em; }

/* ---- Таймлайн статуса ---- */
.timeline { list-style: none; margin: 32px 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 30px 40px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 11px; top: 24px; bottom: 0;
  width: 2px; background: var(--line);
}
.timeline li:last-child::before { display: none; }
.timeline li::after {
  content: ""; position: absolute; left: 4px; top: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--line-strong);
}
.timeline li.is-done::after { background: var(--ok); border-color: var(--ok); }
.timeline li.is-done::before { background: var(--ok); opacity: .35; }
.timeline li.is-current::after {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-100);
}
.timeline li.is-fail::after { background: var(--danger); border-color: var(--danger); }
.timeline__t { font-weight: 600; color: var(--ink-400); }
.timeline li.is-done .timeline__t, .timeline li.is-current .timeline__t,
.timeline li.is-fail .timeline__t { color: var(--ink-900); }
.timeline__d { font-size: 14.5px; color: var(--ink-400); margin-top: 3px; }

/* ---- Админка ---- */
.admin-shell { display: grid; grid-template-columns: 1fr; gap: 24px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.admin-table th, .admin-table td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--paper-2); font-size: 13px; color: var(--ink-500);
  font-weight: 650; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 72px; }
.admin-table tbody tr:hover { background: var(--paper-2); }
.admin-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-actions .btn { padding: 10px 16px; font-size: 14.5px; }
