.pp-extras-block {
  margin: 16px 0;
}

.pp-extras-title {
  margin: 0 0 8px;
  color: #ffeba7;
  font-size: 1rem;
}

.pp-extras-table {
  min-width: 480px;
}

.pp-base-page-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: rgba(203, 213, 225, 0.92);
}

.pp-base-page-row input {
  width: 5rem;
}

.pp-shell {
  width: min(1100px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.pp-hero,
.pp-panel {
  border: 1px solid rgba(255, 235, 167, 0.16);
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  padding: 20px;
  margin-bottom: 16px;
}

.pp-kicker {
  margin: 0 0 6px;
  color: rgba(255, 235, 167, 0.82);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.pp-hero h1 {
  margin: 0 0 8px;
  color: #ffeba7;
}

.pp-muted {
  color: rgba(203, 213, 225, 0.86);
  font-size: 0.9rem;
  margin-top: 8px;
}

.pp-admin-format-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pp-admin-tab {
  border: 1px solid rgba(255, 235, 167, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: rgba(241, 245, 255, 0.92);
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.pp-admin-tab.is-active {
  background: rgba(255, 235, 167, 0.16);
  color: #ffeba7;
}

.pp-admin-table-wrap {
  overflow: auto;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 235, 167, 0.14);
  border-radius: 14px;
}

.pp-admin-price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 0.82rem;
}

.pp-admin-price-table th,
.pp-admin-price-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  padding: 8px 6px;
  text-align: center;
}

.pp-admin-price-table thead th {
  color: #ffeba7;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.55);
}

.pp-admin-price-table tbody th {
  text-align: left;
  color: rgba(223, 233, 255, 0.88);
  min-width: 190px;
  background: rgba(15, 23, 42, 0.72);
}

.pp-admin-price-table input {
  width: 100%;
  min-width: 64px;
  padding: 6px 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.72);
  color: rgba(246, 249, 255, 0.96);
  text-align: right;
}

.pp-admin-price-table select {
  width: 100%;
  min-width: 150px;
  padding: 6px 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.72);
  color: rgba(246, 249, 255, 0.96);
}

.pr-routing-table input {
  min-width: 190px;
  text-align: left;
}

.pp-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.pp-preview-label {
  color: rgba(223, 233, 255, 0.88);
  font-weight: 800;
}

.pp-preview-bar select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(246, 249, 255, 0.96);
}

.pp-duplex-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(223, 233, 255, 0.88);
  font-size: 0.9rem;
}

.pp-admin-profit {
  border: 1px solid rgba(255, 235, 167, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 14px;
  display: grid;
  gap: 6px;
  background: rgba(2, 6, 23, 0.55);
}

.pp-admin-profit > div:not(.pp-admin-profit-section) {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(223, 233, 255, 0.88);
}

.pp-admin-profit-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(223, 233, 255, 0.88);
}

.pp-admin-profit strong {
  color: #ffeba7;
}

.pp-admin-profit-section {
  border-top: 1px solid rgba(255, 235, 167, 0.14);
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding-top: 8px;
}

.pp-admin-profit-section-title {
  color: #ffeba7;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.pp-summary-format {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 235, 167, 0.14);
  font-weight: 800;
  color: #ffeba7 !important;
  justify-content: flex-start !important;
}

.pp-summary-format:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.pp-profit-pos { color: #86efac !important; }
.pp-profit-neg { color: #fca5a5 !important; }

.pp-section-title {
  margin: 18px 0 8px;
  color: #ffeba7;
  font-size: 1rem;
  font-weight: 800;
}

.pp-nemprint-open-btn {
  margin: 4px 0 14px;
}

/* IMPORTANT (foldere): Hide every legacy control even before the admin script has initialized. */
html[data-pp-folder-pricing="true"] #ppLegacyPricingControls,
html[data-pp-folder-pricing="true"] #ppLegacyPackagePrices,
html[data-pp-folder-pricing="true"] #ppLegacyPreview,
html[data-pp-folder-pricing="true"] #ppProfit,
/* IMPORTANT (haefter): Hæfter bruger samme rene admin-shell som Foldere. */
html[data-pp-haefter-pricing="true"] #ppLegacyPricingControls,
html[data-pp-haefter-pricing="true"] #ppLegacyPackagePrices,
html[data-pp-haefter-pricing="true"] #ppLegacyPreview,
html[data-pp-haefter-pricing="true"] #ppProfit,
html[data-pp-haefter-pricing="true"] #ppProductExtrasRoot {
  display: none !important;
}

/* IMPORTANT (plakater): Den præcise 200 g-afledte matrix er eneste prisstyring. */
html[data-pp-plakater-pricing="true"] #ppLegacyPricingControls,
html[data-pp-plakater-pricing="true"] #ppLegacyPackagePrices,
html[data-pp-plakater-pricing="true"] #ppLegacyPreview,
html[data-pp-plakater-pricing="true"] #ppProfit,
html[data-pp-plakater-pricing="true"] #ppProductExtrasRoot {
  display: none !important;
}

/* IMPORTANT (standard print): Den fælles visning erstatter kun legacy-layoutet.
   De flyttede inputs beholder samme datafelter og gemmelogik. */
html[data-pp-unified-legacy-pricing="true"] #ppLegacyPricingControls,
html[data-pp-unified-legacy-pricing="true"] #ppLegacyPackagePrices,
html[data-pp-unified-legacy-pricing="true"] #ppLegacyPreview,
html[data-pp-unified-legacy-pricing="true"] #ppProfit {
  display: none !important;
}

/* IMPORTANT (tri_fold_foldere): Den præcise matrix er autoritativ; gamle
   basis-, tillægs- og previewfelter må ikke vises som alternative priser. */
html[data-pp-trifold-pricing="true"] #ppLegacyPricingControls,
html[data-pp-trifold-pricing="true"] #ppLegacyPackagePrices,
html[data-pp-trifold-pricing="true"] #ppLegacyPreview,
html[data-pp-trifold-pricing="true"] #ppProfit,
html[data-pp-trifold-pricing="true"] #ppProductExtrasRoot {
  display: none !important;
}

.pp-unified-pricing[hidden] {
  display: none;
}

.pp-unified-pricing {
  display: grid;
  gap: 14px;
}

.pp-unified-section {
  border: 1px solid rgba(255, 235, 167, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.5);
  padding: 16px;
}

.pp-unified-section > .pp-extras-title:first-child {
  margin-top: 0;
}

.pp-unified-section .pp-paper-checks {
  margin-top: 12px;
}

.pp-unified-section .pp-admin-table-wrap {
  margin-top: 12px;
  margin-bottom: 0;
}

.pp-paper-check.is-required {
  border-color: rgba(134, 239, 172, 0.5);
  background: rgba(34, 197, 94, 0.1);
}

.pp-paper-check.is-required::after {
  content: "Basis";
  position: absolute;
  top: 19px;
  right: 10px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 7px;
  text-transform: uppercase;
}

.pp-paper-check.is-reference::after {
  content: "Reference";
}

.pp-paper-check.is-required .pp-paper-main {
  padding-right: 64px;
}

.pp-paper-check.is-reference .pp-paper-main {
  padding-right: 86px;
}

.pp-paper-check input:disabled {
  opacity: 1;
}

.pp-nemprint-modal[hidden] {
  display: none;
}

.pp-nemprint-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.pp-nemprint-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(4px);
}

.pp-nemprint-dialog {
  position: relative;
  width: min(680px, 100%);
  border: 1px solid rgba(255, 235, 167, 0.35);
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.56);
  padding: 20px;
}

.pp-nemprint-header,
.pp-nemprint-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pp-nemprint-header h2 {
  margin: 0;
  color: #ffeba7;
}

.pp-nemprint-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.pp-nemprint-choice[hidden] {
  display: none;
}

.pp-nemprint-choice--pages {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pp-nemprint-choice-btn {
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.68);
  color: rgba(241, 245, 255, 0.92);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.pp-nemprint-choice-btn:hover,
.pp-nemprint-choice-btn:focus-visible {
  border-color: rgba(134, 239, 172, 0.72);
}

.pp-nemprint-choice-btn.is-active {
  border-color: #86efac;
  background: rgba(34, 197, 94, 0.16);
  box-shadow: 0 0 0 1px rgba(134, 239, 172, 0.42), 0 0 22px rgba(34, 197, 94, 0.25);
  color: #dcfce7;
  transform: translateY(-1px);
}

.pp-nemprint-fields {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid rgba(255, 235, 167, 0.18);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.44);
}

.pp-nemprint-price-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.pp-nemprint-price-field {
  display: grid;
  gap: 6px;
  color: rgba(203, 213, 225, 0.9);
  font-size: 0.8rem;
  font-weight: 800;
}

.pp-nemprint-price-field input {
  width: 100%;
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-weight: 800;
  text-align: right;
}

.pp-nemprint-footer {
  margin-top: 16px;
}

@media (max-width: 620px) {
  .pp-nemprint-price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pp-nemprint-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

.pp-section-title:first-child {
  margin-top: 0;
}

.pp-tier-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.pp-tier-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.58);
}

.pp-tier-row input {
  width: 72px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
}

.pp-small-btn {
  padding: 6px 10px !important;
  font-size: 0.78rem !important;
}

.pp-weight-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pp-sub-title {
  margin: 16px 0 6px;
  color: rgba(223, 233, 255, 0.92);
  font-size: 0.95rem;
  font-weight: 800;
}

.pp-unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}

.pp-unit-field span {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
  color: rgba(223, 233, 255, 0.88);
  font-size: 0.9rem;
}

.pp-unit-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
}

.pp-calc-table td,
.pp-calc-table th {
  font-size: 0.82rem;
}

.pp-paper-derived {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.45);
  color: rgba(223, 233, 255, 0.72);
  font-size: 0.92rem;
}

.pp-admin-profit-title {
  color: #ffeba7;
  font-weight: 800;
  margin-bottom: 6px;
  justify-content: flex-start !important;
}

.pp-paper-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.pp-choice-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 104px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.58);
  color: rgba(223, 233, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.pp-choice-card:hover {
  border-color: rgba(255, 235, 167, 0.44);
}

.pp-paper-main {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 26px;
  cursor: pointer;
}

.pp-choice-card-label {
  min-width: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.pp-choice-card input {
  margin: 0;
  accent-color: #ffeba7;
}

.pp-choice-card input:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.pp-paper-format-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  gap: 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.pp-paper-format-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 27px;
  padding: 3px 5px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 7px;
  background: rgba(2, 6, 23, 0.42);
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.pp-paper-format-option:has(input:checked) {
  border-color: rgba(255, 235, 167, 0.42);
  color: #ffeba7;
}

.pp-paper-format-option.is-unavailable {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .pp-paper-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .pp-paper-checks {
    grid-template-columns: 1fr;
  }
}
