/* Market Vendor Sign Pack — styles (adapted from the 1099 Batch Kit stylesheet) */
:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --ink: #1c2433;
  --muted: #5d6b82;
  --line: #e3e8f0;
  --brand: #2e7d32;
  --brand-dark: #1b5e20;
  --ok: #0e7c3e;
  --warn: #9a6a00;
  --warn-bg: #fff7e0;
  --err: #b4232a;
  --err-bg: #fdecec;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 18px; }

/* top bar */
.topbar { background: #1b3a1f; color: #fff; position: sticky; top: 0; z-index: 50; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand .logo { font-size: 30px; }
.brand strong { font-size: 18px; display: block; line-height: 1.2; }
.brand .tagline { font-size: 12px; color: #cfe0d1; display: block; }

/* cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin: 22px 0;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}
.hero h1 { margin: 0 0 10px; font-size: 28px; letter-spacing: -0.02em; }
.hero p { margin: 8px 0; }
h2 { font-size: 20px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h3 { font-size: 15px; margin: 0 0 8px; }
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 700;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.privacy-badge {
  background: #eef7ee; border: 1px solid #bfe3c2; border-radius: 8px;
  padding: 10px 14px; font-size: 14px;
}
.saved-note { font-size: 13px; color: var(--ok); font-weight: 600; }

/* forms */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
label { display: block; font-size: 14px; font-weight: 600; }
input, select {
  width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 15px;
  background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.field-errors { color: var(--err); font-size: 14px; margin: 10px 0 0; }
.field-errors:empty { display: none; }

/* dropzone */
.dropzone {
  border: 2px dashed #b9c6dd; border-radius: var(--radius);
  padding: 28px 20px; text-align: center; background: #fafcff;
  cursor: pointer; transition: border-color .15s, background .15s;
  margin-top: 14px;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: #eef7ee; }
.dropzone:focus { outline: 2px solid var(--brand); }
.dz-main { font-size: 16px; margin: 0 0 6px; }
.linklike { background: none; border: none; color: var(--brand); font-size: inherit; cursor: pointer; text-decoration: underline; padding: 0; }

/* buttons */
.btn {
  display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 10px 18px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; }
.btn-pro { background: #f59e0b; border-color: #f59e0b; color: #1c2433; text-decoration: none; }
.btn-pro:hover { background: #d97706; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { color: var(--err); }
.btn-danger:hover { border-color: var(--err); color: var(--err); }
.row { display: flex; align-items: center; }
.gap { gap: 10px; margin-top: 14px; }
.wrap-row { flex-wrap: wrap; }
.actions { white-space: nowrap; }

/* tables */
.table-wrap { overflow-x: auto; margin-top: 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td {
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top;
}
.data-table th { background: #f1f4f9; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

/* previews */
.preview-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px;
}
.preview-sign, .preview-tent {
  border: 2px solid #1c2433; border-radius: 8px; padding: 14px 10px;
  text-align: center; background: #fff;
}
.preview-tents { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; max-width: 560px; }
.preview-tent { padding: 22px 10px; }
.ps-vendor { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ps-name { font-size: 16px; font-weight: 800; margin: 6px 0; }
.ps-price { font-size: 22px; font-weight: 800; color: var(--brand-dark); }
.preview-tent .ps-price { font-size: 28px; }

/* footer */
.footer { padding: 10px 0 40px; font-size: 14px; }
.footer p { margin: 8px 0; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #101828; color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: 90vw; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--err); }

/* paywall overlay */
.paywall {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 150;
}
.paywall[hidden] { display: none; }
.paywall-card {
  background: #fff; border-radius: 16px; padding: 30px; max-width: 460px; width: 100%;
  text-align: center; box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.paywall-card h2 { justify-content: center; font-size: 22px; }
.paywall-card .unlock { margin-top: 18px; }
.paywall-card .btn { margin: 4px; }
.linklike-btn { background: none; border: none; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; margin-top: 10px; }
.linklike-btn:hover { color: var(--ink); }

/* ============================================================
   PRINT — only the active print area is shown.
   The app sets body.print-signs / print-cards / print-log
   before window.print() and clears it after.
   ============================================================ */
@page { size: Letter; margin: 0.5in; }
.print-only { display: none; }
@media print {
  body.print-signs > *:not(#print-signs),
  body.print-cards > *:not(#print-cards),
  body.print-log > *:not(#print-log) { display: none !important; }
  .print-only { display: none; }
  body.print-signs #print-signs,
  body.print-cards #print-cards,
  body.print-log #print-log { display: block !important; }

  /* (a) price-sign grid — 3 columns x 2 rows per Letter page */
  .sign-page {
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr);
    gap: 0.2in; height: 9.75in; page-break-after: always;
  }
  .sign-page:last-child { page-break-after: auto; }
  .sign-card {
    border: 3px solid #000; border-radius: 0.12in; padding: 0.25in;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; overflow: hidden;
  }
  .sign-vendor { font-size: 13pt; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 0.15in; }
  .sign-name { font-size: 26pt; font-weight: 800; line-height: 1.15; margin-bottom: 0.2in; word-break: break-word; }
  .sign-price { font-size: 52pt; font-weight: 800; line-height: 1; white-space: nowrap; }

  /* (b) table / tent cards — 2 large cards per page, fold line hint */
  .tent-page { height: 9.75in; display: flex; flex-direction: column; page-break-after: always; }
  .tent-page:last-child { page-break-after: auto; }
  .tent-card {
    flex: 1; border: 3px solid #000; border-radius: 0.12in; padding: 0.4in;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; overflow: hidden;
  }
  .tent-card.flip { transform: rotate(180deg); } /* top half reads upright when folded */
  .tent-vendor { font-size: 16pt; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 0.2in; }
  .tent-name { font-size: 44pt; font-weight: 800; line-height: 1.1; margin-bottom: 0.25in; word-break: break-word; }
  .tent-price { font-size: 80pt; font-weight: 800; line-height: 1; white-space: nowrap; }
  .fold-hint {
    border-top: 2px dashed #666; margin: 0.12in 0; padding-top: 2px;
    text-align: center; font-size: 10pt; color: #666;
  }

  /* (c) inventory log sheet — writable checklist table */
  .log-page { page-break-after: always; }
  .log-page:last-child { page-break-after: auto; }
  .log-title { font-size: 22pt; margin: 0 0 6pt; border-bottom: 3px solid #000; padding-bottom: 6pt; }
  .log-date { font-size: 13pt; margin: 6pt 0 12pt; }
  .log-table { width: 100%; border-collapse: collapse; }
  .log-table th {
    font-size: 12pt; text-align: left; border-bottom: 3px solid #000; padding: 6px 8px;
  }
  .log-table td {
    border-bottom: 1px solid #000; padding: 0 8px; height: 0.42in; font-size: 13pt;
  }
  .log-note { font-size: 11pt; color: #333; margin-top: 10pt; }
}

@media (max-width: 760px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .hero h1 { font-size: 23px; }
  .topbar-inner { padding: 10px 14px; }
  .preview-grid { grid-template-columns: 1fr 1fr; }
}
