.stickers-main {
  background: #f6f8fb;
}

.sticker-builder {
  padding-block: 24px 42px;
}

.stickers-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: start;
}

.stickers-shop,
.a4-preview-card,
.upload-panel,
.sticker-controls,
.library-panel {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.stickers-hero {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #ffffff, #f2faf8);
  border: 1px solid #dbece8;
  border-radius: 8px;
  margin-bottom: 14px;
}

.stickers-hero__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e6f7f3;
  color: #047b68;
  font-size: 24px;
}

.stickers-hero h1,
.library-panel h2,
.upload-panel h2,
.a4-preview-card h2 {
  margin: 0;
  color: #0f172a;
}

.stickers-hero p,
.upload-panel p {
  margin: 4px 0 0;
  color: #64748b;
}

.sticker-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.sticker-controls label,
.admin-sticker-settings label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 700;
}

.sticker-controls select,
.sticker-controls input,
.admin-sticker-settings input,
.admin-sticker-settings select {
  min-height: 42px;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: #0f172a;
}

.upload-panel {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px;
  margin-bottom: 14px;
}

.upload-drop {
  min-width: 170px;
  min-height: 72px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 1px dashed #41b3a3;
  border-radius: 8px;
  color: #056b5d;
  cursor: pointer;
  background: #f1fbf8;
}

.upload-drop input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.library-panel {
  padding: 16px;
}

.sticker-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.sticker-tabs button {
  border: 1px solid #d8e0ea;
  background: #fff;
  color: #334155;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 700;
}

.sticker-tabs button.is-active {
  background: #073b4c;
  color: #fff;
  border-color: #073b4c;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.sticker-pick-card button {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
  text-align: start;
  color: #0f172a;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.sticker-pick-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, .08);
}

.sticker-pick-card span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #f8fafc;
  border-radius: 6px;
  overflow: hidden;
}

.sticker-pick-card img,
.a4-sticker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sticker-pick-card strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticker-pick-card small {
  color: #64748b;
}

.a4-preview-panel {
  position: sticky;
  top: 88px;
}

.mobile-preview-toggle {
  display: none;
}

.a4-preview-card {
  padding: 16px;
}

.a4-preview-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.a4-preview-card header span {
  color: #64748b;
  font-weight: 700;
}

.page-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-switcher button {
  width: 36px;
  height: 36px;
  border: 1px solid #d8e0ea;
  background: #fff;
  border-radius: 50%;
  color: #0f172a;
}

.page-switcher button:disabled {
  opacity: .38;
}

.a4-sheet-wrap {
  width: min(100%, 340px);
  margin-inline: auto;
}

.a4-sheet {
  position: relative;
  aspect-ratio: var(--a4-ratio, 210 / 297);
  background: #fff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
  overflow: hidden;
}

.a4-sheet::before {
  content: "";
  position: absolute;
  inset: 5%;
  border: 1px dashed #d5dde8;
  pointer-events: none;
}

.a4-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: #94a3b8;
  padding: 20px;
}

.a4-empty i {
  font-size: 28px;
}

.a4-sticker {
  position: absolute;
  border-style: dashed;
  background: rgba(241, 245, 249, .75);
  display: grid;
  place-items: center;
  padding: 2px;
}

.sticker-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.sticker-page-materials { display: grid; gap: .6rem; margin-top: 1rem; }
.sticker-page-materials__row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .75rem; border: 1px solid var(--border-color, #e5e7eb); border-radius: 8px; background: var(--surface, #fff); }
.sticker-page-materials__row label { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; }
.sticker-page-materials__row select { min-width: 12rem; }
@media (max-width: 700px) { .sticker-page-materials__row { align-items: flex-start; flex-direction: column; } .sticker-page-materials__row select { width: 100%; } }

.sticker-summary span,
.sticker-summary strong {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
  text-align: center;
}

.sticker-summary strong {
  color: #047b68;
}

.sticker-warning {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
}

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

.primary-action,
.secondary-action {
  min-height: 44px;
  border-radius: 8px;
  border: 0;
  padding: 0 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.primary-action {
  flex: 1;
  background: #073b4c;
  color: #fff;
}

.secondary-action {
  background: #f1f5f9;
  color: #0f172a;
}

.sticker-jump-ghost {
  position: fixed;
  z-index: 9999;
  object-fit: contain;
  pointer-events: none;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .stickers-workspace {
    grid-template-columns: 1fr;
  }

  .a4-preview-panel {
    position: static;
  }

  .mobile-preview-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }

  .mobile-preview-toggle button {
    min-height: 40px;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    background: #fff;
    font-weight: 800;
  }

  .mobile-preview-toggle button.is-active {
    background: #073b4c;
    border-color: #073b4c;
    color: #fff;
  }

  body:not(.stickers-mobile-preview) .a4-preview-card {
    display: none;
  }

  body.stickers-mobile-preview .stickers-shop {
    display: none;
  }

  .sticker-controls,
  .sticker-summary {
    grid-template-columns: 1fr;
  }

  .upload-panel {
    align-items: stretch;
    flex-direction: column;
  }
}
