/* ============================================================
   Law-docs — витрина: формы (подача) и карточка заявки
   ============================================================ */

/* ---------- подача документа: визард ---------- */
.wizard { padding: 44px 0 10px; }
.wizard-head { margin-bottom: 30px; }
.wizard-head h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.wizard-head p { color: var(--ink-soft); font-size: 16px; max-width: 640px; }

.wizard-steps { display: flex; gap: 8px; margin-bottom: 34px; flex-wrap: wrap; }
.wstep {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
}
.wstep-done { border-color: rgba(46, 125, 79, 0.4); color: var(--ok); }
.wstep-done .wstep-num { background: rgba(46, 125, 79, 0.12); color: var(--ok); }
.wstep-now { border-color: var(--accent); color: var(--accent-deep); box-shadow: 0 4px 14px rgba(43, 94, 167, 0.18); }
.wstep-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tint);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--accent-deep);
  flex: none;
}
.wstep-sep { color: var(--line); align-self: center; }

.wstage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px 44px;
  margin-bottom: 22px;
}
.wstage-title { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.wstage-title .wstep-num { width: 32px; height: 32px; font-size: 15px; }
.wstage-title h2 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  color: var(--navy);
}
.wstage-note { font-size: 12.5px; color: var(--ink-soft); margin-top: 16px; }

/* поля формы */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 640px; }
.form-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="text"],
.form-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: #fbfcfe;
  min-height: 48px;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
}
.hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }

/* выбор раздела */
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pick {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfcfe;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.pick:hover { border-color: var(--accent); transform: translateY(-2px); }
.pick.selected {
  border-color: var(--accent);
  background: var(--tint);
  box-shadow: 0 4px 14px rgba(43, 94, 167, 0.15);
}
.pick svg { width: 22px; height: 22px; flex: none; }
.pick span { font-size: 14px; font-weight: 600; color: var(--navy); }

/* дропзона */
.dropzone {
  border: 2px dashed rgba(43, 94, 167, 0.4);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f6f9fd, #eef3fa);
  padding: 40px 24px;
  text-align: center;
  max-width: 640px;
}
.dropzone svg { width: 40px; height: 40px; margin: 0 auto 14px; }
.dropzone b { display: block; color: var(--navy); font-size: 16px; margin-bottom: 6px; }
.dropzone span { font-size: 13.5px; color: var(--ink-soft); }
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  background: rgba(46, 125, 79, 0.09);
  border: 1px solid rgba(46, 125, 79, 0.35);
  color: var(--ok);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 10px 18px;
}
.file-chip svg { width: 17px; height: 17px; }

/* согласие */
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 640px;
  background: var(--tint);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 22px;
}
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.consent label { font-size: 13.5px; color: var(--ink); cursor: pointer; }
.consent a { font-weight: 600; }

/* подтверждение */
.confirm-panel {
  border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 320px at 100% 0%, rgba(43, 94, 167, 0.25), transparent 60%),
    linear-gradient(150deg, #1c3050, #16243a 70%);
  color: #dbe4f0;
  padding: 44px 48px;
  box-shadow: var(--shadow-deep);
  max-width: 720px;
}
.confirm-panel h2 {
  font-family: var(--font-display);
  color: #f3f6fa;
  font-size: 27px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.confirm-panel h2 svg { width: 30px; height: 30px; flex: none; }
.confirm-panel p { font-size: 15px; color: #b9c6d8; max-width: 520px; margin-bottom: 10px; }
.confirm-panel p b { color: #ffffff; }
.tg-note {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 20px 0 26px;
  font-size: 14px;
  color: #dbe4f0;
  max-width: 560px;
}
.tg-note svg { width: 22px; height: 22px; flex: none; }

/* ---------- карточка заявки ---------- */
.ticket { padding: 44px 0 30px; }
.ticket-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 26px; }
.ticket-head h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  color: var(--navy);
  margin-right: auto;
}
.ticket-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
}
.status-chip { font-size: 13.5px; font-weight: 700; border-radius: 999px; padding: 9px 18px; }
.status-assess { background: rgba(43, 94, 167, 0.12); color: var(--accent-deep); }
.status-work { background: rgba(176, 141, 87, 0.14); color: #8a6a34; }
.status-done { background: rgba(46, 125, 79, 0.12); color: var(--ok); }

.ticket-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.ticket-main { display: grid; gap: 22px; min-width: 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 30px 32px;
}
.panel h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

/* таймлайн статусов */
.timeline { list-style: none; }
.timeline li { position: relative; padding: 0 0 20px 34px; font-size: 14.5px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: -2px;
  width: 2px;
  background: var(--tint-2);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.tl-dot {
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tint-2);
}
.tl-done .tl-dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(46, 125, 79, 0.22);
}
.tl-now .tl-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 94, 167, 0.25);
}
.tl-title { font-weight: 700; color: var(--navy); }
.timeline .tl-date { font-size: 12.5px; color: var(--ink-soft); margin-left: 8px; font-weight: 500; }
.timeline p { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.tl-now .tl-title { color: var(--accent-deep); }

/* диалог */
.chat { display: grid; gap: 14px; margin-bottom: 18px; }
.bubble { max-width: 78%; padding: 13px 17px; border-radius: 16px; font-size: 14.5px; }
.bubble .who { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; letter-spacing: 0.03em; }
.bubble .when { font-size: 11.5px; opacity: 0.6; margin-top: 4px; display: block; }
.b-user { justify-self: end; background: var(--tint); border-bottom-right-radius: 4px; }
.b-user .who { color: var(--accent-deep); }
.b-lawyer { justify-self: start; background: #f1f5f9; border-bottom-left-radius: 4px; }
.b-lawyer .who { color: var(--ok); }
.chat-input { display: flex; gap: 10px; }
.chat-input input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14.5px;
  background: #fbfcfe;
}
.chat-input input:focus { outline: none; border-color: var(--accent); }
.chat-input .btn { padding: 13px 24px; min-height: 44px; }
.chat-input-actions { display: flex; gap: 10px; }
.btn-attach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  flex: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fbfcfe;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-attach svg { width: 19px; height: 19px; }
.btn-attach:hover { border-color: var(--accent); color: var(--accent); }
.attach-file {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  max-width: 100%;
  padding: 9px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.attach-file svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.attach-file small { font-weight: 400; color: var(--ink-soft); }

/* счёт */
.invoice { display: grid; gap: 12px; max-width: 460px; }
.invoice-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14.5px;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 10px;
}
.invoice-row b { color: var(--navy); }
.invoice-sum { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; padding: 8px 0 2px; }
.invoice-sum .sum-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--navy);
}
.pay-note { font-size: 12.5px; color: var(--ink-soft); }
.pay-note b { color: var(--ok); }

/* результат */
.result-file { display: flex; gap: 16px; align-items: center; max-width: 520px; }
.result-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(46, 125, 79, 0.1);
  display: grid;
  place-items: center;
  flex: none;
}
.result-icon svg { width: 26px; height: 26px; }
.result-file b { display: block; font-size: 15px; color: var(--navy); }
.result-file span { font-size: 13px; color: var(--ink-soft); }

/* оценка */
.stars { display: flex; gap: 6px; margin-bottom: 16px; }
.stars svg { width: 30px; height: 30px; }
.review-line {
  font-size: 14px;
  color: var(--ink-soft);
  font-style: italic;
  border-left: 3px solid var(--gold);
  padding-left: 14px;
}

/* сайдбар заявки */
.ticket-aside { display: grid; gap: 22px; }
.doc-chip { display: flex; gap: 12px; align-items: center; }
.doc-chip svg { width: 22px; height: 22px; flex: none; }
.doc-chip b { display: block; font-size: 14px; color: var(--navy); }
.doc-chip span { font-size: 12.5px; color: var(--ink-soft); }
.aside-lawyer { display: flex; gap: 14px; align-items: center; }
.aside-lawyer .avatar { width: 56px; height: 56px; border-radius: 14px; }
.aside-lawyer .avatar span { font-size: 20px; }
.aside-lawyer b { display: block; font-size: 14px; color: var(--navy); }
.aside-lawyer span { font-size: 12.5px; color: var(--ink-soft); }

/* ---------- адаптив ---------- */
@media (max-width: 1000px) {
  .ticket-grid { grid-template-columns: 1fr; }
  .pick-grid { grid-template-columns: 1fr 1fr; }
  .wstage { padding: 30px 26px; }
}
@media (max-width: 640px) {
  .form-grid, .pick-grid { grid-template-columns: 1fr; }
  .bubble { max-width: 92%; }
  .wstage { padding: 26px 18px; }
  .panel { padding: 24px 20px; }
  .chat-input { flex-direction: column; }
  .chat-input .btn { width: 100%; }
  .chat-input-actions { width: 100%; }
  .chat-input-actions .btn { width: auto; flex: 1; }
}