.app-body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #eef3ea;
  color: #1f2a1f;
}

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #ffffff;
  border: 1px solid #d5ddce;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(49, 69, 45, 0.09);
}

.app-header img {
  width: 105px;
  height: auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: #8b1e1e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.app-header h1 {
  margin: 0 0 8px;
  color: #31452d;
  font-size: 30px;
}

.app-header p {
  margin: 0;
  color: #667260;
  line-height: 1.5;
}

.upload-card {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.upload-form,
.status-box,
.alert,
.action-bar,
.preview-frame-wrap {
  background: #ffffff;
  border: 1px solid #d5ddce;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(49, 69, 45, 0.07);
}

.upload-form {
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 18px;
}

.upload-form label {
  flex: 1;
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: #31452d;
}

.upload-form input {
  padding: 12px;
  border: 1px solid #c5ccb9;
  border-radius: 10px;
  background: #f8faf5;
}

.upload-form button,
.btn {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  color: #31452d;
  background: #f4e7b7;
}

.btn.primary,
.upload-form button {
  color: #ffffff;
  background: #31452d;
}

.status-box {
  padding: 18px;
  line-height: 1.55;
  color: #53604d;
}

.status-box b {
  color: #31452d;
}

.alert {
  margin-top: 18px;
  padding: 14px 18px;
  font-weight: 800;
}

.alert.success {
  color: #2f5a2a;
  background: #eef8ea;
}

.alert.danger {
  color: #8b1e1e;
  background: #fff0ee;
}

.action-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 14px;
}

.preview-frame-wrap {
  margin-top: 18px;
  padding: 12px;
}

.preview-frame-wrap iframe {
  width: 100%;
  height: 82vh;
  border: 0;
  background: #ffffff;
}

.preview-body {
  background: #ffffff;
}

@media (max-width: 850px) {
  .app-header,
  .upload-card,
  .upload-form {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
}

@media print {
  .app-shell {
    display: none !important;
  }
}

@page {
  size: A4 portrait;
  margin: 0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #1f2a1f;
}

/* =====================
   COMMON PAGE SETUP
===================== */

.page,
.product-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: #ffffff;
  position: relative;
  page-break-after: always;
  overflow: hidden;
}

/* =====================
   COVER PAGE
===================== */

.page {
  padding: 18mm 14mm;
}

.page::before {
  content: "";
  position: absolute;
  inset: 7mm;
  border: 2.5px solid #43583a;
  border-radius: 14px;
  pointer-events: none;
}

.content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.logo-wrap {
  margin-top: 7mm;
}

.logo {
  width: 230px;
  height: auto;
  object-fit: contain;
  background: transparent;
}

.company-name {
  margin-top: 18px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #31452d;
  line-height: 1.15;
}

.price-title {
  margin-top: 12px;
  display: inline-block;
  padding: 10px 28px;
  background: #f4e7b7;
  border: 2px solid #31452d;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 800;
  color: #8b1e1e;
}

.tagline {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 700;
  color: #61734d;
}

.info-card {
  margin: 28px auto 0;
  width: 90%;
  background: #f8faf5;
  border: 1.5px solid #c5ccb9;
  border-radius: 14px;
  padding: 18px 24px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.info-row {
  margin: 7px 0;
  font-size: 14.5px;
  line-height: 1.45;
}

.label {
  font-weight: 800;
  color: #31452d;
}

.cards {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin: 22px auto 0;
  width: 90%;
}

.card {
  background: #ffffff;
  border: 1.5px solid #c5ccb9;
  border-radius: 14px;
  padding: 16px 18px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.045);
}

.card h3 {
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 2px solid #e7d58a;
  font-size: 16px;
  color: #8b1e1e;
}

.card ul {
  margin: 0;
  padding-left: 17px;
}

.card li {
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.32;
}

.payment p {
  margin: 6px 0;
  font-size: 12.5px;
  line-height: 1.35;
}

.footer-note {
  margin-top: 22px;
  font-size: 11px;
  color: #777;
}

/* =====================
   PRODUCT PAGES
===================== */

.product-page {
  width: 210mm;
  height: 297mm;
  padding: 9mm 7mm;
  overflow: hidden;
}

.list-header {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 3px solid #31452d;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.list-header img {
  width: 62px;
  height: auto;
  object-fit: contain;
}

.list-header h2 {
  margin: 0;
  color: #31452d;
  font-size: 20px;
  line-height: 1.1;
}

.list-header p {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: #777;
}

.product-block {
  border: 1.2px solid #222;
  margin-bottom: 8px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.product-title {
  display: grid;
  grid-template-columns: 45px 1fr;
  background: #f8faf5;
  border-bottom: 1.2px solid #222;
}

.srno {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #b51f1f;
  border-right: 1.2px solid #222;
  font-size: 13px;
}

.pname {
  text-align: center;
  padding: 6px;
  font-weight: 900;
  color: #b51f1f;
  font-size: 12.2px;
  line-height: 1.2;
}

table.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.8px;
}

.price-table th {
  background: #f4e7b7;
  color: #111;
  border: 0.8px solid #222;
  padding: 4px 3px;
  font-weight: 800;
  line-height: 1.15;
}

.price-table td {
  border: 0.8px solid #222;
  padding: 3.5px 3px;
  text-align: center;
  line-height: 1.15;
}

.price-table td:first-child {
  font-weight: 700;
}

.page-footer {
  margin-top: 8px;
  text-align: center;
  font-size: 9.5px;
  color: #666;
}

/* =====================
   PRINT SETTINGS
===================== */

@media print {
  body {
    background: #ffffff;
  }

  .page,
  .product-page {
    margin: 0;
    width: 210mm;
    min-height: 297mm;
    page-break-after: always;
  }

  .product-block {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}