:root {
  --ink: #101a38;
  --muted: #69738e;
  --muted-2: #929bb0;
  --line: #e5e9f2;
  --line-strong: #d9dfeb;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --blue: #1961e8;
  --blue-dark: #104cc2;
  --blue-soft: #edf4ff;
  --violet: #7357e8;
  --mint: #119b76;
  --danger: #d6384c;
  --shadow: 0 14px 40px rgba(34, 50, 84, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 76% 0%, rgba(44, 109, 237, 0.055), transparent 28rem),
    var(--canvas);
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.is-hidden {
  display: none !important;
}

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(218, 224, 237, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  color: var(--ink);
  gap: 13px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #1d6aff, #164ed1);
  box-shadow: 0 7px 17px rgba(25, 97, 232, 0.25);
  color: white;
}

.brand-mark::after {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 2px solid white;
  border-radius: 50%;
  content: "";
}

.brand-mark svg {
  width: 26px;
  height: 26px;
  opacity: 0.9;
  stroke-width: 1.9;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  margin-bottom: 2px;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.model-chip {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #40506f;
  font-size: 0.8rem;
  font-weight: 650;
  gap: 8px;
}

.model-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25b887;
  box-shadow: 0 0 0 4px rgba(37, 184, 135, 0.12);
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #eaf1ff;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 750;
}

.app-shell {
  display: grid;
  min-height: calc(100vh - 76px);
  grid-template-columns: 268px minmax(0, 1fr);
}

.workflow-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 38px 27px 28px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.stepper {
  display: grid;
  gap: 0;
}

.step {
  position: relative;
  display: grid;
  min-height: 98px;
  grid-template-columns: 36px 1fr;
  color: var(--muted-2);
  gap: 13px;
}

.step:not(:last-child)::after {
  position: absolute;
  top: 35px;
  bottom: 3px;
  left: 17px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.step-number {
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: white;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.step strong,
.step small {
  display: block;
}

.step strong {
  padding-top: 7px;
  color: #66718b;
  font-size: 0.86rem;
}

.step small {
  margin-top: 7px;
  font-size: 0.75rem;
  line-height: 1.45;
}

.step.is-active .step-number,
.step.is-complete .step-number {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
  box-shadow: 0 6px 15px rgba(25, 97, 232, 0.22);
}

.step.is-active strong,
.step.is-complete strong {
  color: var(--ink);
}

.step.is-complete .step-number {
  color: transparent;
}

.step.is-complete .step-number::before {
  position: absolute;
  color: white;
  content: "✓";
}

.project-mini {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}

.project-mini .eyebrow {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-mini > strong {
  display: block;
  overflow: hidden;
  margin-bottom: 14px;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-stats {
  display: grid;
  margin-bottom: 13px;
  gap: 8px;
}

.mini-stats span {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.76rem;
  gap: 7px;
}

.mini-stats b {
  color: var(--ink);
}

.mini-stats svg {
  width: 15px;
  height: 15px;
}

.projects-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
}

.projects-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.projects-panel-heading > div {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.projects-panel-heading span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.projects-panel-heading b {
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--blue);
  font-size: 0.62rem;
}

.projects-panel-heading button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}

.projects-panel-heading button:hover {
  background: #f0f4fb;
  color: var(--blue);
}

.projects-panel-heading button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.projects-list {
  display: grid;
  max-height: 218px;
  overflow-y: auto;
  padding-right: 3px;
  gap: 6px;
  scrollbar-width: thin;
}

.projects-empty {
  padding: 15px 5px;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.saved-project {
  display: grid;
  width: 100%;
  min-width: 0;
  align-items: center;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  grid-template-columns: 7px minmax(0, 1fr);
  text-align: left;
  column-gap: 8px;
}

.saved-project:hover {
  border-color: #dbe5f6;
  background: #f7f9fd;
}

.saved-project.is-active {
  border-color: #bcd0f7;
  background: #eef4ff;
}

.saved-project-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aab4c7;
  grid-row: 1 / 3;
}

.saved-project-status.status-ready {
  background: var(--mint);
}

.saved-project-status.status-processing {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(25, 97, 232, 0.12);
}

.saved-project-status.status-error {
  background: #df5b62;
}

.saved-project-copy {
  min-width: 0;
}

.saved-project-copy strong,
.saved-project-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-project-copy strong {
  color: var(--ink);
  font-size: 0.75rem;
}

.saved-project-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
}

.saved-project-state {
  display: none;
}

.projects-new-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 9px;
  border: 1px dashed #c8d5eb;
  border-radius: 9px;
  background: transparent;
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 750;
  gap: 6px;
}

.projects-new-button:hover {
  border-color: #97b6ee;
  background: #f3f7ff;
}

.projects-new-button svg {
  width: 14px;
  height: 14px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  margin-top: auto;
  padding: 14px;
  border-radius: 13px;
  background: #eff9f6;
  color: #297c65;
  gap: 10px;
}

.privacy-note > span {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #d9f2eb;
}

.privacy-note svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.privacy-note strong,
.privacy-note small {
  display: block;
}

.privacy-note strong {
  font-size: 0.75rem;
}

.privacy-note small {
  margin-top: 3px;
  opacity: 0.8;
  font-size: 0.65rem;
  line-height: 1.35;
}

.workspace {
  position: relative;
  min-width: 0;
  padding: 45px 48px 60px;
}

.screen {
  display: none;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  animation: screen-in 0.35s ease both;
}

.screen.is-active {
  display: block;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert {
  max-width: 1500px;
  margin: 0 auto 20px;
  padding: 13px 16px;
  border: 1px solid #ffd3d9;
  border-radius: 12px;
  background: #fff2f4;
  color: #ad2940;
  font-size: 0.84rem;
}

.create-grid {
  display: grid;
  min-height: calc(100vh - 181px);
  align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.78fr);
  gap: clamp(50px, 7vw, 116px);
}

.create-copy {
  max-width: 660px;
  padding-left: clamp(0px, 2.6vw, 40px);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.73rem;
  font-weight: 750;
  gap: 7px;
}

.section-kicker svg {
  width: 15px;
  height: 15px;
}

.create-copy h1 {
  max-width: 650px;
  margin: 0 0 21px;
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  font-weight: 710;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.create-copy > p {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

.feature-list {
  display: grid;
  max-width: 610px;
  margin-top: 38px;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.feature-list > div {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
}

.feature-list > div > span {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #dbe5fa;
  border-radius: 9px;
  background: white;
  color: var(--blue);
  font-size: 0.64rem;
  font-weight: 800;
}

.feature-list p {
  margin: 0;
}

.feature-list strong,
.feature-list small {
  display: block;
}

.feature-list strong {
  margin: 1px 0 4px;
  font-size: 0.78rem;
}

.feature-list small {
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.42;
}

.form-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.card-heading {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
  gap: 13px;
}

.heading-icon {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--blue);
}

.heading-icon svg {
  width: 21px;
  height: 21px;
}

.card-heading span {
  color: var(--blue);
  font-size: 0.69rem;
  font-weight: 750;
  text-transform: uppercase;
}

.card-heading h2 {
  margin: 3px 0 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.form-card label {
  display: block;
  margin-bottom: 18px;
}

.form-card label > span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.77rem;
  font-weight: 650;
}

.form-card label em {
  color: var(--muted-2);
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 500;
}

.form-card input,
.form-card textarea {
  width: 100%;
  outline: none;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  font-size: 0.84rem;
  transition: 0.2s ease;
}

.form-card input {
  height: 47px;
  padding: 0 14px;
}

.form-card textarea {
  min-height: 103px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.5;
}

.form-card input::placeholder,
.form-card textarea::placeholder {
  color: #a9b0c2;
}

.form-card input:focus,
.form-card textarea:focus {
  border-color: #8eb4ff;
  box-shadow: 0 0 0 4px rgba(25, 97, 232, 0.08);
}

.form-hint {
  display: flex;
  align-items: center;
  margin: 4px 0 20px;
  padding: 13px;
  border-radius: 11px;
  background: #f4f7fc;
  color: var(--muted);
  font-size: 0.72rem;
  gap: 10px;
}

.form-hint svg {
  flex: 0 0 auto;
  color: var(--blue);
}

.form-hint strong {
  color: var(--ink);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s ease;
  gap: 9px;
}

.primary-button {
  border: 1px solid var(--blue);
  background: linear-gradient(135deg, #216cf1, #1554d8);
  box-shadow: 0 7px 18px rgba(25, 97, 232, 0.18);
  color: white;
}

.primary-button:hover {
  border-color: var(--blue-dark);
  background: linear-gradient(135deg, #195fdd, #0f46bc);
  transform: translateY(-1px);
}

.primary-button:disabled {
  border-color: #b9c7e5;
  background: #b9c7e5;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.primary-button svg,
.secondary-button svg {
  width: 17px;
  height: 17px;
}

.wide {
  width: 100%;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: white;
  color: #38445f;
}

.secondary-button:hover {
  border-color: #b8c4d8;
  background: #f9fbff;
}

.text-button {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  gap: 6px;
}

.text-button svg {
  width: 15px;
  height: 15px;
}

.page-heading,
.results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
}

.page-heading h1,
.results-heading h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.75rem, 2.7vw, 2.55rem);
  letter-spacing: -0.04em;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-step {
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.format-note {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.format-note strong {
  font-size: 0.74rem;
}

.format-note span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
}

.upload-main {
  min-width: 0;
}

.dropzone {
  position: relative;
  display: flex;
  min-height: 310px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px dashed #aebfe3;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 20%, rgba(33, 108, 241, 0.08), transparent 180px),
    rgba(255, 255, 255, 0.83);
  cursor: pointer;
  transition: 0.2s ease;
}

.dropzone::before,
.dropzone::after {
  position: absolute;
  width: 110px;
  height: 110px;
  border: 1px solid #edf2fb;
  border-radius: 28px;
  content: "";
  transform: rotate(18deg);
}

.dropzone::before {
  top: -55px;
  right: -35px;
}

.dropzone::after {
  bottom: -70px;
  left: -25px;
}

.dropzone.is-dragging {
  border-color: var(--blue);
  background-color: #f2f7ff;
  transform: scale(1.005);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid #d9e6ff;
  border-radius: 20px;
  background: var(--blue-soft);
  color: var(--blue);
}

.drop-icon svg {
  width: 30px;
  height: 30px;
}

.dropzone > strong {
  font-size: 1.12rem;
}

.dropzone > p {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 0.8rem;
}

.select-file-button {
  padding: 10px 15px;
  border: 1px solid #cbd7ed;
  border-radius: 10px;
  background: white;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
}

.queue-section {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.section-title,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title h2,
.panel-heading h2 {
  margin: 0;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}

.section-title span,
.panel-heading span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
}

.photo-queue {
  display: grid;
  margin-top: 16px;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 12px;
}

.queue-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfe;
}

.queue-item img {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: cover;
}

.queue-item p {
  overflow: hidden;
  margin: 0;
  padding: 10px 11px;
  font-size: 0.7rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item button {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(13, 22, 48, 0.72);
  color: white;
}

.queue-item button svg {
  width: 14px;
  height: 14px;
}

.queue-item.is-uploaded::after {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(22, 155, 110, 0.92);
  color: white;
  content: "Загружено";
  font-size: 0.57rem;
  font-weight: 750;
}

.action-card {
  align-self: start;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 10px 35px rgba(34, 50, 84, 0.06);
}

.action-visual {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  margin: 0 auto 22px;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(145deg, #edf4ff, #f8f5ff);
  color: var(--blue);
}

.action-visual span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: white;
  box-shadow: 0 8px 20px rgba(46, 70, 120, 0.1);
}

.action-visual svg {
  width: 27px;
  height: 27px;
}

.action-visual i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7f63ee;
}

.action-visual i:nth-child(2) { top: 13px; right: 15px; }
.action-visual i:nth-child(3) { bottom: 18px; right: 8px; width: 4px; height: 4px; }
.action-visual i:nth-child(4) { bottom: 10px; left: 16px; width: 5px; height: 5px; background: #2eb995; }

.action-card h2 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 1.05rem;
}

.action-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.55;
  text-align: center;
}

.action-card ul {
  display: grid;
  margin: 22px 0;
  padding: 0;
  list-style: none;
  gap: 11px;
}

.action-card li {
  display: flex;
  align-items: center;
  color: #4b5771;
  font-size: 0.73rem;
  gap: 8px;
}

.action-card li svg {
  width: 17px;
  height: 17px;
  padding: 3px;
  border-radius: 50%;
  background: #e9f8f3;
  color: #15956f;
  stroke-width: 2.8;
}

.processing-status {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  margin-bottom: 8px;
  border-radius: 999px;
  background: #e8edf6;
}

.progress-track i {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #8166ef);
  animation: progress-run 1.4s ease-in-out infinite;
}

@keyframes progress-run {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

.results-heading {
  align-items: center;
}

.results-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 13px;
}

.results-heading h1 {
  margin-bottom: 0;
}

.success-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 14px;
  background: #e5f7f1;
  color: #149870;
}

.success-mark svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.4;
}

.results-actions {
  display: flex;
  gap: 10px;
}

.result-stats {
  display: grid;
  margin-bottom: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.result-stats > div {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  gap: 12px;
}

.stat-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
}

.stat-icon svg {
  width: 19px;
  height: 19px;
}

.stat-icon.blue { background: #edf4ff; color: var(--blue); }
.stat-icon.violet { background: #f2efff; color: var(--violet); }
.stat-icon.mint { background: #eaf8f4; color: var(--mint); }

.result-stats p {
  margin: 0;
}

.result-stats small,
.result-stats strong {
  display: block;
}

.result-stats small {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.65rem;
}

.result-stats strong {
  font-size: 1.15rem;
}

.result-layout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.75fr);
  gap: 18px;
}

.viewer-column {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.viewer-panel .panel-heading,
.object-table-panel .panel-heading,
.objects-panel > .panel-heading {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.toggle {
  display: flex;
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.7rem;
  gap: 8px;
}

.toggle input {
  position: absolute;
  opacity: 0;
}

.toggle > span {
  position: relative;
  width: 35px;
  height: 20px;
  margin: 0;
  border-radius: 999px;
  background: #cbd3e1;
  transition: 0.2s;
}

.toggle > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  content: "";
  box-shadow: 0 1px 4px rgba(20, 30, 55, 0.2);
  transition: 0.2s;
}

.toggle input:checked + span {
  background: var(--blue);
}

.toggle input:checked + span::after {
  transform: translateX(15px);
}

.image-stage {
  position: relative;
  display: grid;
  min-height: 390px;
  max-height: 650px;
  overflow: hidden;
  place-items: center;
  background:
    linear-gradient(45deg, #eef1f6 25%, transparent 25%) 0 0 / 18px 18px,
    linear-gradient(45deg, transparent 75%, #eef1f6 75%) 0 0 / 18px 18px,
    linear-gradient(45deg, transparent 75%, #eef1f6 75%) 9px -9px / 18px 18px,
    linear-gradient(45deg, #eef1f6 25%, #f8f9fc 25%) 9px 9px / 18px 18px;
}

.image-stage > img {
  display: block;
  max-width: 100%;
  max-height: 650px;
  object-fit: contain;
}

.box-layer {
  position: absolute;
  pointer-events: none;
}

.object-box {
  position: absolute;
  appearance: none;
  padding: 0;
  border: 2px solid var(--box-color);
  border-radius: 3px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28) inset;
  cursor: pointer;
  pointer-events: auto;
  transition: 0.15s;
}

.object-box:hover,
.object-box.is-active {
  z-index: 3;
  border-width: 3px;
  filter: brightness(0.92);
}

.object-box span {
  position: absolute;
  top: -2px;
  left: -2px;
  display: flex;
  max-width: 180px;
  overflow: hidden;
  align-items: center;
  padding: 5px 7px;
  border-radius: 3px 0 5px 0;
  background: var(--box-color);
  color: white;
  font-size: clamp(0.52rem, 0.8vw, 0.68rem);
  font-weight: 750;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
}

.box-layer.is-hidden-boxes {
  display: none;
}

.thumbnails {
  display: flex;
  overflow-x: auto;
  padding: 12px;
  gap: 9px;
  scrollbar-width: thin;
}

.thumbnail {
  position: relative;
  width: 85px;
  height: 59px;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #edf0f5;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(25, 97, 232, 0.12);
}

.thumbnail span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  min-width: 18px;
  height: 18px;
  margin: 0;
  padding: 0 4px;
  place-items: center;
  border-radius: 6px;
  background: rgba(11, 20, 43, 0.76);
  color: white;
  font-size: 0.55rem;
  font-weight: 750;
}

.objects-panel {
  position: sticky;
  top: 94px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
}

.panel-heading.stacked {
  display: grid;
  align-items: stretch;
}

.panel-heading h2 b {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  margin-left: 5px;
  padding: 0 6px;
  place-items: center;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.65rem;
}

.object-search {
  position: relative;
  margin-top: 13px;
}

.object-search svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 16px;
  height: 16px;
  color: #8c96aa;
  transform: translateY(-50%);
}

.object-search input {
  width: 100%;
  height: 38px;
  outline: 0;
  padding: 0 12px 0 35px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8f9fc;
  font-size: 0.73rem;
}

.object-search input:focus {
  border-color: #a5bdea;
  background: white;
}

.category-pills {
  display: flex;
  overflow-x: auto;
  padding: 12px 14px 4px;
  gap: 6px;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 0.63rem;
  white-space: nowrap;
}

.category-pill.is-active {
  border-color: #d6e3ff;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.object-grid {
  display: grid;
  padding: 12px 14px 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.object-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: 0.2s ease;
}

.object-card:hover,
.object-card.is-active {
  border-color: #a9c2f4;
  box-shadow: 0 8px 20px rgba(34, 56, 105, 0.09);
  transform: translateY(-2px);
}

.crop-wrap {
  display: grid;
  height: 126px;
  overflow: hidden;
  place-items: center;
  background:
    linear-gradient(45deg, #f1f3f7 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(45deg, transparent 75%, #f1f3f7 75%) 0 0 / 14px 14px,
    linear-gradient(45deg, transparent 75%, #f1f3f7 75%) 7px -7px / 14px 14px,
    linear-gradient(45deg, #f1f3f7 25%, #fafbfc 25%) 7px 7px / 14px 14px;
}

.crop-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.confidence-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.93);
  color: var(--mint);
  font-size: 0.55rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(20, 30, 50, 0.1);
}

.object-card-info {
  padding: 10px;
}

.object-card-info > strong {
  display: block;
  overflow: hidden;
  margin-bottom: 3px;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-card-info > span {
  display: block;
  color: var(--muted);
  font-size: 0.58rem;
}

.yandex-link {
  display: flex;
  align-items: center;
  margin-top: 9px;
  color: #e5323e;
  font-size: 0.61rem;
  font-weight: 700;
  gap: 5px;
}

.yandex-mark {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #ef5360;
  border-radius: 50%;
  font-size: 0.63rem;
  font-weight: 800;
}

.yandex-link svg {
  width: 12px;
  height: 12px;
  margin-left: auto;
}

.empty-state {
  display: flex;
  min-height: 280px;
  align-items: center;
  justify-content: center;
  padding: 35px;
  color: var(--muted);
  flex-direction: column;
  text-align: center;
}

.empty-state svg {
  width: 35px;
  height: 35px;
  margin-bottom: 12px;
  color: #9aa6bb;
}

.empty-state strong {
  color: var(--ink);
  font-size: 0.85rem;
}

.empty-state span {
  max-width: 220px;
  margin-top: 6px;
  font-size: 0.68rem;
  line-height: 1.5;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
}

th,
td {
  padding: 11px 13px;
  border-bottom: 1px solid #eef1f6;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #fafbfe;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 650;
}

tbody tr {
  transition: 0.15s;
}

tbody tr:hover,
tbody tr.is-active {
  background: #f5f8ff;
}

td:first-child {
  color: var(--muted);
}

.table-object {
  display: flex;
  align-items: center;
  gap: 7px;
}

.table-object img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.accuracy {
  color: var(--mint);
  font-weight: 700;
}

.table-yandex {
  display: inline-flex;
  align-items: center;
  color: #e5323e;
  text-decoration: none;
}

.table-yandex svg {
  width: 14px;
  height: 14px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 15px;
  border-radius: 11px;
  background: #15203b;
  box-shadow: 0 12px 35px rgba(18, 28, 54, 0.3);
  color: white;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .workflow-sidebar {
    padding-right: 22px;
    padding-left: 22px;
  }

  .workspace {
    padding: 36px 32px 50px;
  }

  .create-grid {
    gap: 42px;
  }

  .create-copy h1 {
    font-size: 3.2rem;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .feature-list small {
    max-width: 290px;
  }

  .result-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .objects-panel {
    position: static;
    max-height: none;
  }

  .object-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app-header {
    padding: 0 20px;
  }

  .app-shell {
    display: block;
  }

  .workflow-sidebar {
    display: block;
    padding: 16px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stepper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .step {
    min-height: auto;
    grid-template-columns: 30px 1fr;
  }

  .step:not(:last-child)::after {
    top: 14px;
    right: 9px;
    bottom: auto;
    left: 29px;
    width: auto;
    height: 1px;
  }

  .step-number {
    width: 29px;
    height: 29px;
  }

  .step strong {
    padding-top: 6px;
    font-size: 0.72rem;
  }

  .step small,
  .project-mini,
  .privacy-note {
    display: none !important;
  }

  .projects-panel {
    margin-top: 13px;
    padding: 10px;
  }

  .projects-panel-heading {
    margin-bottom: 7px;
  }

  .projects-list {
    display: flex;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 3px;
  }

  .saved-project {
    min-width: 205px;
    max-width: 245px;
    flex: 0 0 auto;
  }

  .projects-new-button {
    margin-top: 7px;
  }

  .workspace {
    padding: 32px 24px 48px;
  }

  .create-grid {
    display: block;
    min-height: auto;
  }

  .create-copy {
    margin: 15px auto 38px;
    padding-left: 0;
    text-align: center;
  }

  .create-copy > p {
    margin-right: auto;
    margin-left: auto;
  }

  .feature-list {
    display: none;
  }

  .form-card {
    max-width: 520px;
    margin: 0 auto;
  }

  .upload-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .action-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    column-gap: 10px;
  }

  .action-visual {
    grid-row: 1 / span 3;
    margin: 0;
  }

  .action-card h2,
  .action-card > p {
    text-align: left;
  }

  .action-card ul,
  .action-card .primary-button,
  .action-card .processing-status {
    grid-column: 1 / -1;
  }

  .object-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .app-header {
    height: 66px;
    padding: 0 15px;
  }

  .brand small,
  .model-chip,
  .icon-button {
    display: none;
  }

  .brand strong {
    font-size: 0.96rem;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .app-shell {
    min-height: calc(100vh - 66px);
  }

  .workflow-sidebar {
    padding: 13px 12px;
  }

  .step {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .step > div {
    display: none;
  }

  .step:not(:last-child)::after {
    right: -2px;
    left: calc(50% + 17px);
  }

  .workspace {
    padding: 26px 14px 40px;
  }

  .create-copy {
    margin-top: 0;
    margin-bottom: 27px;
  }

  .create-copy h1 {
    font-size: 2.35rem;
  }

  .create-copy > p {
    font-size: 0.88rem;
  }

  .section-kicker {
    margin-bottom: 15px;
  }

  .form-card {
    padding: 22px;
    border-radius: 18px;
  }

  .page-heading,
  .results-heading {
    display: block;
  }

  .format-note {
    display: none;
  }

  .results-actions {
    margin-top: 18px;
  }

  .results-actions > * {
    flex: 1;
    padding: 0 12px;
  }

  .dropzone {
    min-height: 270px;
    padding: 20px;
    text-align: center;
  }

  .photo-queue {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-card {
    display: block;
  }

  .action-visual {
    margin: 0 auto 18px;
  }

  .action-card h2,
  .action-card > p {
    text-align: center;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }

  .image-stage {
    min-height: 250px;
  }

  .viewer-panel .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .object-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crop-wrap {
    height: 118px;
  }
}
