.zpl-shell {
  padding-top: 22px;
}

.zpl-hero {
  margin-bottom: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,248,243,0.98)),
    radial-gradient(circle at top right, rgba(71, 108, 99, 0.08), transparent 32%);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.zpl-hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

.zpl-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.zpl-hero .eyebrow {
  background: #eef3ef;
  color: var(--primary);
}

.zpl-hero h1 {
  color: var(--text);
}

.zpl-hero p {
  color: var(--muted);
  max-width: 760px;
}

.zpl-stat-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf6 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(17, 36, 66, 0.05);
}

.zpl-stat-card strong {
  font-size: 2rem;
  line-height: 1;
  color: var(--primary-dark);
}

.zpl-stat-card span {
  margin-top: 8px;
  color: var(--muted);
}

.zpl-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 22px;
}

.zpl-form-panel,
.zpl-preview-panel {
  min-width: 0;
}

.zpl-config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-size: 0.95rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(21, 66, 216, 0.8);
  box-shadow: 0 0 0 4px rgba(21, 66, 216, 0.12);
}

.field textarea {
  min-height: 360px;
  resize: vertical;
  line-height: 1.5;
}

.field-wide {
  margin-bottom: 16px;
}

.zpl-upload-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px dashed #d4ccbd;
  border-radius: 16px;
  background: #fcfbf8;
  color: var(--muted);
  margin-bottom: 18px;
}

.zpl-upload-placeholder i {
  color: var(--primary);
  font-size: 1.1rem;
}

.zpl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.zpl-actions button {
  border: none;
  cursor: pointer;
}

.btn-dark-ghost {
  background: linear-gradient(135deg, #476c63, #5a8277);
  color: #fff;
  border-color: transparent;
}

.btn-dark-ghost:hover {
  color: #fff;
}

.zpl-feedback {
  display: none;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 0.96rem;
  line-height: 1.45;
}

.zpl-feedback.is-visible {
  display: block;
}

.zpl-feedback.success {
  background: #eaf8f0;
  color: var(--success);
  border: 1px solid rgba(21, 146, 98, 0.18);
}

.zpl-feedback.error {
  background: #fff1f2;
  color: #b42318;
  border: 1px solid rgba(180, 35, 24, 0.15);
}

.zpl-feedback.info {
  background: #f2f5f1;
  color: var(--primary-dark);
  border: 1px solid rgba(71, 108, 99, 0.15);
}

.zpl-preview-meta {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7f5f0;
  border: 1px solid var(--border);
  color: var(--primary-dark);
  font-size: 0.94rem;
  font-weight: 700;
}

.zpl-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.zpl-preview-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fffdfa;
  max-width: 100%;
}

.zpl-preview-card-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.zpl-preview-card img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  max-height: 75vh;
  object-fit: contain;
}

.zpl-empty-state {
  grid-column: 1 / -1;
  padding: 32px 20px;
  text-align: center;
  border: 1px dashed #d5ccbe;
  border-radius: 18px;
  background: #fcfbf8;
}

.zpl-empty-state h3 {
  margin: 0 0 10px;
  font-weight: 800;
}

.zpl-empty-state p {
  margin: 0;
  color: var(--muted);
}

.print-frame {
  position: absolute;
  width: 0;
  height: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 991px) {
  .zpl-hero-grid,
  .zpl-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .zpl-config-grid,
  .zpl-hero-stats {
    grid-template-columns: 1fr;
  }

  .zpl-actions {
    flex-direction: column;
  }

  .zpl-actions .btn-main,
  .zpl-actions .btn-ghost {
    width: 100%;
  }
}
