/* Print Fast Free Printing & Packaging Tools Suite (scoped under .pf-tool-wrap) */
.pf-tool-wrap, .pf-tool-wrap * {
  box-sizing: border-box;
}
.pf-tool-wrap {
  --pf-ink: #18181b;
  --pf-muted: #52525b;
  --pf-border: #e4e4e7;
  --pf-surface: #ffffff;
  --pf-bg: #f4f4f5;
  --pf-red: #c81e20;
  --pf-red-dark: #991b1b;
  --pf-teal: #0f766e;
  --pf-teal-soft: #f0fdfa;
  --pf-amber: #b45309;
  --pf-amber-soft: #fffbeb;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 280px);
  color: var(--pf-ink);
  padding: 20px 0 64px;
  overflow-x: hidden;
}
.pf-tool-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Sub-navigation inside /tai-nguyen/ cluster (not in site top header) */
.pf-tool-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--pf-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.pf-tool-subnav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #3f3f46;
  text-decoration: none;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.pf-tool-subnav a:hover {
  background: #f4f4f5;
  color: var(--pf-ink);
}
.pf-tool-subnav a.is-active {
  background: var(--pf-ink);
  color: #ffffff;
}

/* Hero Banner */
.pf-tool-hero {
  background: linear-gradient(135deg, #18181b 0%, #27272a 60%, #3f181a 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(24, 24, 27, 0.12);
}
.pf-tool-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(200, 30, 32, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fecaca;
  margin-bottom: 12px;
}
.pf-tool-hero h1 {
  color: #ffffff;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.25;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.pf-tool-hero p {
  color: #e4e4e7;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  max-width: 820px;
}

/* Hub Cards (/tai-nguyen/) */
.pf-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.pf-hub-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--pf-border);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.pf-hub-card:hover {
  transform: translateY(-3px);
  border-color: #d4d4d8;
  box-shadow: 0 14px 30px rgba(24, 24, 27, 0.08);
}
.pf-hub-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.pf-hub-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fef2f2;
  color: var(--pf-red);
  flex-shrink: 0;
}
.pf-hub-icon.is-teal {
  background: var(--pf-teal-soft);
  color: var(--pf-teal);
}
.pf-hub-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #3f3f46;
}
.pf-hub-card h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--pf-ink);
  margin: 0 0 8px;
  line-height: 1.35;
}
.pf-hub-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--pf-muted);
  margin: 0 0 16px;
}
.pf-hub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.pf-hub-meta span {
  font-size: 12px;
  color: #3f3f46;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  padding: 3px 8px;
}
.pf-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pf-red);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.16s ease, transform 0.12s ease;
}
.pf-btn-primary:hover {
  background: var(--pf-red-dark);
  color: #ffffff !important;
}
.pf-btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pf-ink);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
}
.pf-btn-dark:hover {
  background: #27272a;
}
.pf-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  color: var(--pf-ink) !important;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid #d4d4d8;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.pf-btn-outline:hover {
  border-color: var(--pf-ink);
  background: #fafafa;
}

/* Tool 2-Column Workspace */
.pf-tool-grid {
  display: grid;
  grid-template-columns: minmax(300px, 410px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.pf-tool-grid > *,
.pf-card,
.pf-stage,
.pf-compare-table-wrap,
.pf-preset-row,
.pf-field {
  min-width: 0;
  max-width: 100%;
}
.pf-card {
  background: #ffffff;
  border: 1px solid var(--pf-border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}
.pf-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--pf-ink);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Inputs & Controls */
.pf-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.pf-field {
  margin-bottom: 14px;
}
.pf-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #3f3f46;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pf-field input[type="number"],
.pf-field input[type="text"],
.pf-field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid #d4d4d8;
  background: #fafafa;
  color: var(--pf-ink);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  box-shadow: none;
}
.pf-field input:focus,
.pf-field select:focus {
  outline: none;
  border-color: var(--pf-red);
  background: #ffffff;
}
.pf-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.pf-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #fafafa;
  color: #3f3f46;
  cursor: pointer;
  transition: all 0.14s ease;
}
.pf-chip:hover {
  border-color: #a1a1aa;
  background: #ffffff;
}
.pf-chip.is-active {
  background: var(--pf-ink);
  border-color: var(--pf-ink);
  color: #ffffff;
}

/* KPI Grid & Visual Sheet Stage */
.pf-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.pf-kpi-box {
  background: #fafafa;
  border: 1px solid var(--pf-border);
  border-radius: 12px;
  padding: 13px 14px;
}
.pf-kpi-box.is-highlight {
  background: var(--pf-teal-soft);
  border-color: #99f6e4;
}
.pf-kpi-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #52525b;
  margin-bottom: 4px;
}
.pf-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--pf-ink);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.pf-kpi-sub {
  font-size: 12px;
  color: #52525b;
  margin-top: 2px;
}

.pf-savings-callout {
  background: var(--pf-amber-soft);
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pf-savings-callout.is-optimal {
  background: var(--pf-teal-soft);
  border-color: #5eead4;
}
.pf-savings-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: #18181b;
  flex: 1 1 260px;
}

.pf-stage {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 290px;
  margin-bottom: 16px;
}
.pf-stage svg {
  max-width: 100%;
  height: auto;
  display: block;
}
.pf-stage-caption {
  font-size: 12px;
  color: #64748b;
  margin-top: 10px;
  text-align: center;
}

/* Comparison Table inside Imposition Calculator */
.pf-compare-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 16px;
  border: 1px solid var(--pf-border);
  border-radius: 12px;
}
.pf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 0;
}
.pf-table th {
  background: #18181b;
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  white-space: nowrap;
}
.pf-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f4f4f5;
  color: #27272a;
  vertical-align: middle;
}
.pf-table tr.is-best-row td {
  background: #f0fdfa;
  font-weight: 600;
}

/* Zalo / Workshop Quote Footer Box */
.pf-zalo-card {
  background: linear-gradient(135deg, #fff1f2 0%, #ffffff 100%);
  border: 1px solid #fecdd3;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pf-zalo-spec {
  font-size: 13px;
  color: #3f3f46;
  line-height: 1.5;
  flex: 1 1 260px;
}
.pf-zalo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Die-line Gallery */
.pf-dl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.pf-dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.pf-dl-card {
  background: #ffffff;
  border: 1px solid var(--pf-border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}
.pf-dl-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}
.pf-dl-card.is-hidden {
  display: none;
}
.pf-dl-preview-box {
  background: #fafafa;
  border: 1px solid #f4f4f5;
  border-radius: 10px;
  height: 170px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  overflow: hidden;
}
.pf-dl-preview-svg {
  max-width: 100%;
  max-height: 146px;
  width: auto;
  height: auto;
}
.pf-dl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #52525b;
  background: #ffffff;
  border: 1px solid var(--pf-border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.pf-dl-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 99px;
  margin-right: 5px;
}
.pf-dl-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--pf-ink);
  margin: 0 0 6px;
  line-height: 1.35;
}
.pf-dl-dim {
  font-size: 12px;
  font-weight: 700;
  color: var(--pf-teal);
  margin-bottom: 6px;
}
.pf-dl-desc {
  font-size: 13px;
  color: var(--pf-muted);
  line-height: 1.5;
  margin: 0 0 14px;
}
.pf-dl-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* QR & EAN-13 Specific */
.pf-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f4f4f5;
  padding: 5px;
  border-radius: 11px;
  margin-bottom: 16px;
}
.pf-mode-tab {
  border: none;
  background: transparent;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #52525b;
  cursor: pointer;
}
.pf-mode-tab.is-active {
  background: #ffffff;
  color: var(--pf-ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.pf-code-stage {
  background: #ffffff;
  border: 1px solid var(--pf-border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  margin-bottom: 14px;
}
.pf-konly-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  background: #18181b;
  color: #ffffff;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.pf-status-msg {
  font-size: 12.5px;
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.pf-status-msg.is-ok {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.pf-status-msg.is-err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Info / Educational Guide Below Tool */
.pf-guide-box {
  margin-top: 28px;
  background: #ffffff;
  border: 1px solid var(--pf-border);
  border-radius: 16px;
  padding: 24px;
}
.pf-guide-box h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--pf-ink);
}
.pf-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.pf-guide-item h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--pf-red);
}
.pf-guide-item p {
  font-size: 13.5px;
  line-height: 1.55;
  color: #3f3f46;
  margin: 0;
}

@media (max-width: 980px) {
  .pf-tool-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pf-dl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pf-guide-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .pf-tool-container {
    padding: 0 14px;
  }
  .pf-tool-hero {
    padding: 22px 16px;
  }
  .pf-card {
    padding: 16px;
  }
  .pf-stage {
    padding: 12px;
  }
  .pf-chip {
    white-space: normal;
    text-align: left;
  }
  .pf-hub-grid,
  .pf-dl-grid,
  .pf-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pf-form-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .pf-dl-btns {
    grid-template-columns: minmax(0, 1fr);
  }
}
