@import url("./fonts/fonts.css");

:root {
  --bg: #060B08;
  --surface: #0C130F;
  --surface-2: #111A15;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --txt: #EEF5F0;
  --mut: #90A498;
  --ink: #04170C;
  --brand: #01E358;
  --accent: #75FFAA;
  --danger: #FF6B6B;
  --r-lg: 34px;
  --r-md: 26px;
  --r-sm: 18px;
}

* { box-sizing: border-box; }

/* `[hidden]` and a class selector have equal specificity, so the UA's
   `display: none` loses to rules like `.btn { display: inline-flex }` that
   come later -- hidden buttons would still render. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--txt);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto;
  height: 70vh;
  background:
    radial-gradient(48% 60% at 22% 0%, rgba(1, 227, 88, .17), transparent 70%),
    radial-gradient(42% 55% at 78% 8%, rgba(117, 255, 170, .11), transparent 72%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; }
p { margin: 0; }
h1, h2 { margin: 0; font-weight: 500; letter-spacing: -.035em; }

.shell {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand__link {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}

.brand__link img {
  display: block;
  height: 26px;
  width: auto;
  max-width: 55vw;
}

.brand__label {
  font-weight: 600;
  font-size: 14px;
  color: var(--mut);
  padding-left: 12px;
  border-left: 1px solid var(--line-2);
  line-height: 1.1;
}

/* ==========================================================================
   HERO — «наклейка» с обводкой, как на xata436.tech
   ========================================================================== */
.hero { margin: 6px 0 2px; }

.hero__title {
  font-size: clamp(26px, 7vw, 40px);
  line-height: 1.32;
  font-weight: 600;
  /* каждая строка получает свою «наклейку», поэтому нужен вертикальный зазор */
  margin-bottom: 14px;
}

.sticker {
  display: inline;
  padding: .12em .34em;
  border-radius: .42em;
  background: rgba(9, 15, 11, .74);
  border: 1.5px solid rgba(255, 255, 255, .17);
  box-shadow:
    0 0 0 5px rgba(6, 11, 8, .5),
    0 18px 44px rgba(0, 0, 0, .45);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero__text {
  margin-top: 18px;
  color: var(--mut);
  font-size: 15px;
  max-width: 34em;
}

.progress {
  display: flex;
  gap: 6px;
}

.progress i {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line-2);
  transition: background .2s ease;
}

.progress i.done { background: var(--brand); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 26px;
}

.card h1 {
  font-size: 26px;
  margin-bottom: 6px;
}

.card .hint {
  color: var(--mut);
  font-size: 14px;
  margin-bottom: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  /* без этого intrinsic-ширина date-инпута распирает колонку наружу */
  min-width: 0;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--mut);
}

.field input,
.field textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 13px 16px;
  font: inherit;
  color: var(--txt);
  outline: none;
  transition: border-color .15s ease;
}

.field textarea { resize: vertical; min-height: 72px; }

/* Firefox/Safari дают input[type=date] собственную минимальную ширину под
   нативный пикер, из-за чего поле вылезало за карточку. */
.field input[type="date"] {
  min-width: 0;
  max-width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

/* иначе в iOS Safari date-инпут схлопывается по высоте */
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }

.field input:focus,
.field textarea:focus { border-color: var(--brand); }

.field .error {
  font-size: 12.5px;
  color: var(--danger);
  min-height: 16px;
}

.choice-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.choice {
  flex: 1;
  padding: 16px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-2);
  background: var(--surface-2);
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.choice.active {
  border-color: var(--brand);
  background: rgba(1, 227, 88, .1);
  color: var(--brand);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 26px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
}

.btn--solid {
  background: var(--brand);
  color: var(--ink);
  flex: 1;
}

.btn--solid:hover { background: var(--accent); }

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

.btn--ghost {
  background: transparent;
  color: var(--txt);
  border: 1.5px solid var(--line-2);
}

.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.review-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.review-row:last-child { border-bottom: none; }
.review-row span:first-child { color: var(--mut); }
.review-row span:last-child { text-align: right; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  width: fit-content;
}

.status-pill.new { color: var(--mut); }
.status-pill.approved { color: var(--brand); border-color: rgba(1, 227, 88, .4); }
.status-pill.rejected { color: var(--danger); border-color: rgba(255, 107, 107, .4); }

/* ==========================================================================
   ЧЕК-ЛИСТ ЭТАПОВ ЗАЯВКИ
   ========================================================================== */
.steps {
  list-style: none;
  margin: 20px 0 4px;
  padding: 0;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  color: var(--mut);
  font-size: 15px;
  position: relative;
}

/* соединительная линия между отметками */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 31px;
  bottom: -9px;
  width: 2px;
  background: var(--line-2);
}

.step--done:not(:last-child)::before { background: var(--brand); }

.step__box {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  margin-top: 1px;
  background: var(--surface-2);
  position: relative;
  z-index: 1;
}

.step--done { color: var(--txt); }

.step--done .step__box {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--ink);
  font-weight: 700;
}

.step--current { color: var(--txt); font-weight: 600; }

.step--current .step__box {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(1, 227, 88, .18);
}

.notice {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
}

.notice--rejected {
  border-color: rgba(255, 107, 107, .4);
  background: rgba(255, 107, 107, .1);
  color: #ffb3b3;
}

.notice--clarification {
  border-color: rgba(255, 190, 90, .4);
  background: rgba(255, 190, 90, .1);
  color: #ffd79a;
}

.notice--office_visit {
  border-color: rgba(1, 227, 88, .4);
  background: rgba(1, 227, 88, .1);
  color: var(--accent);
}

.footer-note {
  color: var(--mut);
  font-size: 12.5px;
  text-align: center;
  margin-top: 10px;
}

.top-error {
  background: rgba(255, 107, 107, .1);
  border: 1px solid rgba(255, 107, 107, .3);
  color: var(--danger);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-size: 14px;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(1, 227, 88, .12);
  border: 1.5px solid rgba(1, 227, 88, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--brand);
  margin-bottom: 16px;
}

.token-box {
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-size: 13px;
  word-break: break-all;
  margin: 16px 0;
}

.token-box a { color: var(--brand); font-weight: 600; }

@media (max-width: 480px) {
  .card { padding: 22px 18px; border-radius: var(--r-md); }
  .choice-row { flex-direction: column; }
}
