@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f4f2ed;
  --panel: #fffefb;
  --ink: #191b18;
  --muted: #72746f;
  --line: #dcdad3;
  --line-strong: #c7c3b9;
  --green: #163a34;
  --green-soft: #e7f0ec;
  --lime: #d6f36b;
  --brown: #4e3f32;
  --danger: #b9443f;
  --shadow: 0 26px 70px -50px rgba(29, 31, 27, 0.45);
  --radius: 22px;
  --shell: 1320px;
}

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

[hidden] {
  display: none !important;
}

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

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, rgba(214, 243, 107, 0.22), transparent 25rem),
    radial-gradient(circle at 95% 20%, rgba(22, 58, 52, 0.08), transparent 26rem),
    var(--bg);
  color: var(--ink);
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(22, 58, 52, 0.22);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px max(24px, calc((100vw - var(--shell)) / 2));
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(18px) saturate(170%);
}

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

.brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--green);
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

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

.brand strong {
  font-size: 14px;
  line-height: 1.2;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar__actions,
.hub-link,
.privacy-pill {
  display: flex;
  align-items: center;
}

.topbar__actions {
  gap: 14px;
}

.privacy-pill {
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.privacy-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #28a66a;
  box-shadow: 0 0 0 4px rgba(40, 166, 106, 0.11);
}

.hub-link {
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 700;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.hub-link:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 68px 24px 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: end;
  gap: 70px;
  margin-bottom: 48px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow span {
  color: var(--green);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 5.1vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: var(--brown);
  font-style: normal;
  font-weight: 400;
}

.hero__copy {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(360px, 0.68fr);
  align-items: stretch;
  gap: 22px;
}

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

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 86px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.panel__header > div,
.step {
  display: flex;
  align-items: center;
}

.panel__header > div {
  gap: 14px;
}

.panel__header h2,
.panel__header p {
  margin: 0;
}

.panel__header h2 {
  font-size: 17px;
  letter-spacing: -0.025em;
}

.panel__header p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.step {
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}

.step--dark {
  background: rgba(214, 243, 107, 0.14);
  color: var(--lime);
}

.hint {
  color: var(--muted);
  font-size: 10px;
}

.creator__grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(300px, 1.2fr);
  gap: 28px;
  padding: 28px;
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 390px;
  place-items: center;
  border: 1.5px dashed var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.28)),
    repeating-linear-gradient(45deg, #f5f3ee 0 12px, #f9f8f4 12px 24px);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--green);
  transform: translateY(-2px);
}

.dropzone.has-photo {
  border-style: solid;
  background: #e8e6df;
}

#photo-preview {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
}

.dropzone__empty {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 30px;
  text-align: center;
}

.upload-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 16px;
  background: var(--green);
  color: var(--lime);
  font-size: 20px;
  box-shadow: 0 10px 24px -14px rgba(22, 58, 52, 0.7);
}

.dropzone__empty strong {
  font-size: 13px;
}

.dropzone__empty > span:not(.upload-icon) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.dropzone__empty small {
  margin-top: 18px;
  color: #9b9c96;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.photo-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: rgba(25, 27, 24, 0.82);
  color: #fff;
  cursor: pointer;
}

.photo-note {
  margin: 10px 6px 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.field {
  display: block;
}

.field > span {
  display: block;
  margin: 0 0 7px 2px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #fbfaf7;
  color: var(--ink);
  font-size: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input::placeholder {
  color: #a1a29d;
}

.field input:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 58, 52, 0.08);
}

.primary-button,
.download-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.primary-button {
  height: 52px;
  margin-top: auto;
  background: var(--green);
  color: #fff;
  font-size: 12px;
}

.primary-button svg {
  color: var(--lime);
}

.primary-button:hover,
.download-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.download-button:active,
.secondary-button:active {
  transform: scale(0.985);
}

.batch {
  display: flex;
  min-height: 610px;
  flex-direction: column;
  background: var(--green);
  color: #fff;
}

.batch .panel__header {
  border-color: rgba(255, 255, 255, 0.11);
}

.batch .panel__header p {
  color: rgba(255, 255, 255, 0.5);
}

.count {
  display: grid;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
}

.batch__body {
  min-height: 250px;
  flex: 1;
  padding: 18px 20px;
  overflow: auto;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  flex-direction: column;
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 16px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  color: var(--lime);
  font-size: 20px;
}

.empty-state strong {
  font-size: 13px;
}

.empty-state p {
  max-width: 260px;
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  line-height: 1.6;
}

.batch-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.batch-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.065);
  animation: item-in 0.28s ease both;
}

.batch-item__photo {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  object-fit: cover;
}

.batch-item__text {
  min-width: 0;
}

.batch-item__text strong,
.batch-item__text span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-item__text strong {
  font-size: 11px;
}

.batch-item__text span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 9px;
}

.batch-item__remove {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.batch-item__remove:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.batch__footer {
  padding: 18px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.batch-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 9px;
}

.batch-meta button {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  font-size: 9px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.batch-meta button:disabled {
  cursor: default;
  opacity: 0.35;
}

.download-button {
  min-height: 50px;
  background: var(--lime);
  color: var(--green);
  font-size: 12px;
}

.secondary-button {
  min-height: 42px;
  margin-top: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 10px;
}

.download-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  transform: none;
}

.limit-note {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 8.5px;
  text-align: center;
}

.delivery-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 254, 251, 0.62);
}

.delivery-note__number {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 15px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.delivery-note strong,
.delivery-note p {
  margin: 0;
}

.delivery-note strong {
  font-size: 11px;
}

.delivery-note p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.delivery-note__file {
  color: var(--line-strong);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: min(380px, calc(100vw - 48px));
  padding: 13px 16px;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 18px 45px -20px rgba(0, 0, 0, 0.58);
  font-size: 11px;
  animation: toast-in 0.25s ease both;
}

.toast.is-error {
  background: var(--danger);
}

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

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

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero__copy {
    max-width: 620px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .batch {
    min-height: 520px;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 68px;
    padding: 12px 16px;
  }

  .privacy-pill {
    display: none;
  }

  .hub-link {
    padding: 9px 10px;
    font-size: 0;
  }

  .hub-link svg {
    width: 18px;
    height: 18px;
  }

  .shell {
    padding: 42px 16px 54px;
  }

  .hero {
    margin-bottom: 30px;
  }

  .hero h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .hero__copy {
    font-size: 13px;
  }

  .panel__header {
    padding: 18px;
  }

  .hint {
    display: none;
  }

  .creator__grid {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .dropzone,
  #photo-preview {
    min-height: 320px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .delivery-note {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .delivery-note__file {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
