:root {
  --bg: #0b1015;
  --panel: #141d27;
  --panel2: #0f1720;
  --panel3: #18232f;
  --line: #263545;
  --line2: #33475b;
  --text: #e9eef5;
  --muted: #8fa1b5;
  --muted2: #6f8399;
  --accent: #f08a24;
  --accent2: #d97812;
  --accent-soft: rgba(240, 138, 36, 0.14);
  --danger: #ff7b72;
  --danger-soft: rgba(255, 123, 114, 0.12);
  --ok: #4cc38a;
  --ok-soft: rgba(76, 195, 138, 0.12);
  --warn: #f4c95d;
  --warn-soft: rgba(244, 201, 93, 0.12);
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(760px 440px at 8% -10%, rgba(240, 138, 36, 0.14), transparent 60%),
    radial-gradient(620px 360px at 100% 0%, rgba(74, 113, 147, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 26px 16px 40px;
}

.head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.logo {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), #c86409);
  display: grid;
  place-items: center;
  color: #1a1208;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(240, 138, 36, 0.25);
}

.head__text {
  min-width: 0;
  flex: 1;
}

.head h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 11px;
  white-space: nowrap;
}

.local-note {
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid rgba(240, 138, 36, 0.35);
  border-radius: 10px;
  background: var(--accent-soft);
  color: #ffc784;
  font-size: 12px;
  line-height: 1.35;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.autofill {
  padding: 17px 20px 18px;
  background:
    linear-gradient(180deg, rgba(240, 138, 36, 0.08), transparent 72%),
    var(--panel3);
  border-bottom: 1px solid var(--line);
}

.autofill__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.autofill__title {
  font-size: 14px;
  font-weight: 700;
}

.autofill__hint {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  max-width: 680px;
}

.tag {
  flex: 0 0 auto;
  margin-left: auto;
  border: 1px solid rgba(240, 138, 36, 0.35);
  background: var(--accent-soft);
  color: #ffc784;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.textarea,
input[type="text"],
input[type="tel"],
input[type="email"] {
  width: 100%;
  border: 1px solid var(--line2);
  background: var(--panel2);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.5;
}

.textarea::placeholder,
input::placeholder {
  color: #62758a;
}

.textarea:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus {
  border-color: #4a7193;
  box-shadow: 0 0 0 3px rgba(74, 113, 147, 0.16);
  background: #0d151d;
}

.autofill__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
}

.autofill__status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.autofill__status.is-ok {
  color: var(--ok);
}

.autofill__status.is-warn {
  color: var(--warn);
}

.autofill__status.is-error {
  color: var(--danger);
}

.autofill__done {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 7px;
  font-size: 12px;
  line-height: 1.2;
}

.autofill__done-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ok);
  color: #07130d;
  font-size: 12px;
  font-weight: 900;
}

.autofill__done-label {
  color: #8fe0b7;
  font-size: 12px;
  font-weight: 700;
}

.autofill__missing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffc784;
  font-size: 12px;
  line-height: 1.2;
}

.autofill__missing-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff7ed;
  font-size: 13px;
  font-weight: 900;
}

.autofill__missing-text {
  font-weight: 700;
}

.autofill__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.chip {
  --chip-border: rgba(240, 138, 36, 0.35);
  --chip-bg: rgba(240, 138, 36, 0.12);
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  margin-right: 3px;
  border: 0;
  background: transparent;
  color: #ffd09a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.chip::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  bottom: -5px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--chip-bg);
  z-index: -1;
}

.chip--done {
  --chip-border: rgba(76, 195, 138, 0.4);
  --chip-bg: rgba(76, 195, 138, 0.14);
  color: #8fe0b7;
}

.chip-sep {
  margin-right: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.autofill__done .chip-sep {
  color: #8fe0b7;
}

.autofill__missing .chip-sep {
  color: #ffc784;
}

.steps {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px 0;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.step-pill span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line2);
  background: var(--panel2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.step-pill.is-active {
  color: var(--text);
}

.step-pill.is-active span {
  border-color: var(--accent);
  background: var(--accent);
  color: #221406;
}

.step-pill.is-done span {
  border-color: rgba(76, 195, 138, 0.45);
  background: var(--ok-soft);
  color: var(--ok);
}

.step-line {
  flex: 1;
  height: 1px;
  background: var(--line);
  min-width: 18px;
}

.step {
  padding: 18px 20px 22px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 14px;
}

.grid--2 {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field > label:not(.consent__label) {
  display: block;
  margin-bottom: 6px;
  color: #cfd9e5;
  font-size: 12.5px;
  font-weight: 600;
}

.req {
  color: var(--accent);
  font-weight: 700;
}

.field .muted {
  color: var(--muted2);
  font-weight: 500;
}

.field .hint {
  margin-top: 5px;
  color: var(--muted2);
  font-size: 11.5px;
  line-height: 1.35;
}

.field .error {
  display: none;
  margin-top: 5px;
  color: var(--danger);
  font-size: 11.5px;
  line-height: 1.35;
}

.field.has-error > label {
  color: #ffb4ae;
}

.field.has-error input[type="text"],
.field.has-error input[type="tel"],
.field.has-error input[type="email"],
.field.has-error .textarea {
  border-color: var(--danger);
  background: rgba(255, 123, 114, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 123, 114, 0.1);
}

.field.has-error .error {
  display: block;
}

.field.has-error .pay {
  border-color: rgba(255, 123, 114, 0.55);
}

.field.has-error .consent__label {
  color: #ffb4ae;
}

.pay {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
  background: var(--panel2);
}

.pay__option {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 0;
  padding: 8px 9px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  transition: background 0.15s ease;
}

.pay__option:hover {
  background: rgba(255, 255, 255, 0.035);
}

.pay__option input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 2px 0 0;
}

.pay__option span {
  display: block;
  margin-left: 10px;
  line-height: 1.35;
}

.photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
}

.photos:empty {
  display: none;
}

.photo {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line2);
  background: #fff;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo__doc {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--panel2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 6px;
  word-break: break-all;
}

.photo__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 16, 21, 0.72);
  color: #fff;
  font-size: 15px;
  line-height: 22px;
  text-align: center;
  padding: 0;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.photo__remove:hover {
  background: var(--accent);
  color: #1b1207;
}

.photo__state {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 5px;
  background: rgba(11, 16, 21, 0.76);
  color: #fff;
  font-size: 9.5px;
  line-height: 1.2;
  text-align: center;
  backdrop-filter: blur(4px);
}

.photo.is-error .photo__state {
  background: rgba(180, 40, 40, 0.9);
}

.photo.is-ready .photo__state {
  background: rgba(22, 104, 70, 0.9);
}

.photo__retry {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(11, 16, 21, 0.45);
  color: #fff;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.photo__retry:hover {
  background: rgba(11, 16, 21, 0.6);
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.photo-actions .hint {
  margin: 0;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.actions__hint {
  flex: 1;
  color: var(--muted2);
  font-size: 11.5px;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 17px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid #7fb2dc;
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: linear-gradient(135deg, #f29a3b, var(--accent2));
  border-color: var(--accent2);
  color: #241506;
  box-shadow: 0 8px 22px rgba(240, 138, 36, 0.18);
}

.btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffa946, #e28316);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line2);
  color: #cfd9e5;
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.045);
  border-color: #49617a;
}

.btn--mic.is-active {
  background: rgba(239, 68, 68, 0.16);
  border-color: #ef4444;
  color: #ffb4ae;
}

.btn--small {
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 600;
}

.specialist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.specialist-head label,
.specialist-head .specialist-title {
  margin: 0;
  color: #cfd9e5;
  font-size: 12.5px;
  font-weight: 600;
}

.summary {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel2);
  overflow: hidden;
}

.summary__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.summary__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.summary__edit {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 0;
}

.summary__edit:hover {
  text-decoration: underline;
}

.summary__body {
  padding: 4px 13px 9px;
}

.summary__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(38, 53, 69, 0.75);
  font-size: 12.5px;
}

.summary__row:last-child {
  border-bottom: 0;
}

.summary__label {
  color: var(--muted2);
}

.summary__value {
  color: #dbe4ee;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.consent {
  padding: 2px 0;
}

.consent__label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  cursor: pointer;
}

.consent__label input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.status {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.4;
}

.status.is-error {
  display: block;
  background: var(--danger-soft);
  border: 1px solid rgba(255, 123, 114, 0.35);
  color: #ffb4ae;
}

.status.is-warn {
  display: block;
  background: var(--warn-soft);
  border: 1px solid rgba(244, 201, 93, 0.3);
  color: #f7d98a;
}

.status.is-ok {
  display: block;
  background: var(--ok-soft);
  border: 1px solid rgba(76, 195, 138, 0.3);
  color: #8fe0b7;
}

.result {
  padding: 34px 24px 30px;
  text-align: center;
}

.result__icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
}

.result--ok .result__icon {
  background: var(--ok-soft);
  border: 1px solid rgba(76, 195, 138, 0.4);
  color: var(--ok);
}

.result--warn .result__icon {
  background: var(--warn-soft);
  border: 1px solid rgba(244, 201, 93, 0.4);
  color: var(--warn);
}

.result h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.result p {
  max-width: 560px;
  margin: 0 auto 10px;
  color: var(--muted);
  font-size: 13.5px;
}

.result .result__cid {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.result .btn {
  margin-top: 12px;
}

.foot {
  margin-top: 14px;
  color: var(--muted2);
  font-size: 11px;
  text-align: center;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 10, 14, 0.72);
  backdrop-filter: blur(4px);
}

.overlay__box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 19px;
  border: 1px solid var(--line2);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13.5px;
}

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 680px) {
  .page {
    padding: 14px 10px 26px;
  }

  .head {
    gap: 10px;
    margin-bottom: 13px;
  }

  .logo {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 13px;
  }

  .head h1 {
    font-size: 17px;
  }

  .head p {
    font-size: 11.5px;
  }

  .badge {
    display: none;
  }

  .card {
    border-radius: 18px;
  }

  .autofill,
  .steps,
  .step {
    padding-left: 13px;
    padding-right: 13px;
  }

  .autofill {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .autofill__head {
    gap: 8px;
  }

  .tag {
    display: none;
  }

  .grid,
  .grid--2 {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .field--full {
    grid-column: auto;
  }

  .steps {
    gap: 7px;
    padding-top: 12px;
  }

  .step-pill {
    font-size: 10.5px;
  }

  .step-pill span {
    width: 19px;
    height: 19px;
    font-size: 10px;
  }

  .step {
    padding-top: 14px;
    padding-bottom: 17px;
  }

  .actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 9px;
    margin-top: 16px;
  }

  .actions .btn {
    width: 100%;
  }

  .actions__hint {
    text-align: center;
  }

  .photo {
    width: 82px;
    height: 82px;
  }

  .summary__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .summary__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .specialist-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .specialist-head .btn {
    width: 100%;
  }

  .result {
    padding: 28px 15px 24px;
  }

  .result h2 {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
