@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src:
    url("../vendor/fonts/manrope/Manrope-cyrillic-Regular.woff2") format("woff2"),
    url("../vendor/fonts/manrope/Manrope-Regular.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../vendor/fonts/manrope/Manrope-Regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src:
    url("../vendor/fonts/manrope/Manrope-cyrillic-SemiBold.woff2") format("woff2"),
    url("../vendor/fonts/manrope/Manrope-SemiBold.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../vendor/fonts/manrope/Manrope-SemiBold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src:
    url("../vendor/fonts/manrope/Manrope-cyrillic-Bold.woff2") format("woff2"),
    url("../vendor/fonts/manrope/Manrope-Bold.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../vendor/fonts/manrope/Manrope-Bold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #1c2a33;
  --muted: #5b6d78;
  --line: #c5d3dc;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --ok: #0e6b4c;
  --shadow: 0 10px 30px rgba(28, 42, 51, 0.08);
  --radius: 16px;
  --tap: 48px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --keyboard-inset: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}

body {
  min-height: 100dvh;
}

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

button,
input,
textarea,
select,
label {
  font: inherit;
}

.app-shell {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 20px 16px calc(120px + var(--keyboard-inset));
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  margin-bottom: 28px;
}

.brand__logo {
  display: block;
  width: clamp(82px, 24vw, 116px);
  height: auto;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}

.brand__title {
  margin: 0;
  max-width: 21rem;
  font-size: clamp(1.45rem, 5.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: var(--ink);
}

.topbar__brand {
  width: auto;
  height: 28px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  background: none;
  flex-shrink: 0;
}

.home-actions {
  display: grid;
  gap: 14px;
}

.home-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 22px 54px 22px 20px;
  border: 2px solid #9bb8ed;
  border-radius: var(--radius);
  background: #f3f7ff;
  box-shadow: 0 7px 18px rgba(73, 112, 181, 0.1);
  color: inherit;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.home-card::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  color: #668bd0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.home-card:active {
  transform: scale(0.985);
  background: #e9f0fd;
  box-shadow: 0 4px 12px rgba(73, 112, 181, 0.13);
}

.home-card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-card__text {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow-x: clip;
  padding: 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.topbar__end {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: right;
}

.link-back {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  font-weight: 600;
}

.progress {
  display: grid;
  gap: 8px;
}

.progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.progress__track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #d7e2e8;
}

.progress__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d4ed8, var(--accent));
  transition: width 180ms ease;
}

.step-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.step-hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.fields {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.field__label {
  font-weight: 600;
}

.field__row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.field__row .field__control {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  max-width: 100%;
}

.field__now {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
  white-space: nowrap;
}

.field__control,
.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field input[type="time"],
.field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--tap);
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-sizing: border-box;
}

.field input[type="date"],
.field input[type="time"] {
  display: block;
  font-size: 16px;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
}

.field input[type="date"]::-webkit-date-and-time-value,
.field input[type="time"]::-webkit-date-and-time-value {
  text-align: left;
}

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

.field__control:focus,
.field input:focus,
.field textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  border-color: var(--accent);
}

.field.is-invalid .field__control,
.field.is-invalid input,
.field.is-invalid textarea,
.field.is-invalid .choice-group {
  border-color: var(--danger);
}

.field__error {
  display: none;
  color: var(--danger);
  font-size: 0.9rem;
}

.field.is-invalid .field__error {
  display: block;
}

.quick-input {
  display: grid;
  gap: 10px;
}

.quick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-option {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #9bb8ed;
  border-radius: 999px;
  background: #f3f7ff;
  color: #315ea8;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
}

.quick-option.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.quick-option:active {
  transform: scale(0.98);
}

.choice-group {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
}

.choice-group--pair {
  grid-template-columns: 1fr 1fr;
}

.choice-group--two-columns {
  grid-template-columns: 1fr 1fr;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: var(--tap);
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  text-align: center;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.choice__label {
  pointer-events: none;
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.choice:has(input:checked).choice--positive {
  border-color: var(--ok);
  background: rgba(14, 107, 76, 0.12);
  color: var(--ok);
  box-shadow: inset 0 0 0 1px var(--ok);
}

.choice:has(input:checked).choice--negative {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}

.choice:has(input:checked).choice--neutral {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice:active {
  transform: scale(0.985);
}

.photo-box {
  display: grid;
  gap: 10px;
}

.photo-preview {
  display: none;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.photo-preview.is-visible {
  display: block;
}

.photo-status {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.photo-status.is-busy {
  color: var(--accent);
}

.photo-status.is-ok {
  color: #0b6b3a;
}

.photo-actions {
  display: grid;
  gap: 10px;
}

.btn,
.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--secondary {
  background: #e7eef2;
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.btn:disabled,
.file-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.file-btn {
  background: #e7eef2;
  color: var(--ink);
}

.file-btn input {
  display: none;
}

.sticky-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--keyboard-inset);
  z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96) 28%, #ffffff);
  transition: bottom 250ms ease;
}

.sticky-actions__inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  width: min(560px, 100%);
  margin: 0 auto;
}

.sticky-actions__inner.is-single {
  grid-template-columns: 1fr;
}

.report {
  display: grid;
  gap: 16px;
}

.report__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.report__company {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.report__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report__item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.report__item strong {
  display: block;
  margin-bottom: 4px;
}

.report__item span {
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.report__actions {
  display: grid;
  gap: 10px;
}

.banner {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.banner--error {
  background: var(--danger-bg);
  color: var(--danger);
}

.banner--info {
  background: rgba(37, 99, 235, 0.1);
  color: var(--ok);
}

.hidden {
  display: none !important;
}

@media (min-width: 640px) {
  .app-shell {
    padding-top: 28px;
  }
}
