:root {
  --pt-bg: #0c0e12;
  --pt-panel: #14171d;
  --pt-panel-2: #1a1e26;
  --pt-line: #2a303a;
  --pt-gold: #d4a537;
  --pt-gold-2: #f0c85a;
  --pt-text: #f4f1e9;
  --pt-muted: #a4aab5;
  --pt-green: #62d394;
  --pt-red: #ff7a7a;
}
body.pro-tool-page {
  background: var(--pt-bg);
  color: var(--pt-text);
}
.pt-hero {
  padding: 150px 20px 58px;
  text-align: center;
  background: radial-gradient(circle at 50% 0, #d4a53715, transparent 45%);
}
.pt-hero .pt-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid #d4a5374d;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--pt-gold-2);
  font:
    700 11px/1 "Roboto Mono",
    monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pt-hero h1 {
  margin: 18px auto 14px;
  max-width: 900px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
}
.pt-hero h1 span {
  color: var(--pt-gold);
}
.pt-hero p {
  max-width: 720px;
  margin: auto;
  color: var(--pt-muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
}
.pt-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.pt-trust span {
  border: 1px solid var(--pt-line);
  border-radius: 999px;
  padding: 7px 11px;
  color: #b8bec8;
  font-size: 11px;
  background: #ffffff05;
}
.pt-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 70px;
}
.pt-app {
  border: 1px solid var(--pt-line);
  border-radius: 18px;
  background: linear-gradient(145deg, #171a21, #11141a);
  box-shadow: 0 28px 75px #0007;
  overflow: hidden;
}
.pt-app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--pt-line);
  background: #ffffff03;
}
.pt-app-head b {
  font-size: 14px;
}
.pt-app-head span {
  color: var(--pt-green);
  font-size: 11px;
}
.pt-app-body {
  padding: clamp(18px, 4vw, 34px);
}
.pt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  gap: 24px;
}
.pt-grid.equal {
  grid-template-columns: 1fr 1fr;
}
.pt-card {
  border: 1px solid var(--pt-line);
  border-radius: 13px;
  background: var(--pt-panel);
  padding: 20px;
  min-width: 0;
}
.pt-card h2,
.pt-card h3 {
  margin: 0 0 14px;
  font-size: 18px;
  text-transform: none;
}
.pt-card p {
  color: var(--pt-muted);
  font-size: 13px;
  line-height: 1.6;
}
.pt-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pt-field {
  min-width: 0;
}
.pt-field.full {
  grid-column: 1/-1;
}
.pt-field label {
  display: block;
  margin-bottom: 6px;
  color: #cbd0d9;
  font-size: 12px;
  font-weight: 700;
}
.pt-field input,
.pt-field select,
.pt-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #343b47;
  border-radius: 8px;
  background: #0e1116;
  color: #fff;
  padding: 10px 12px;
  font: inherit;
}
.pt-field textarea {
  min-height: 100px;
  resize: vertical;
}
.pt-field input:focus,
.pt-field select:focus,
.pt-field textarea:focus {
  outline: 2px solid #d4a53755;
  border-color: var(--pt-gold);
}
.pt-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pt-muted);
  font-size: 12px;
}
.pt-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--pt-gold);
}
.pt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.pt-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--pt-line);
  border-radius: 9px;
  background: #20252e;
  color: #fff;
  padding: 10px 17px;
  font:
    750 12px/1 "Roboto Mono",
    monospace;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
}
.pt-btn:hover {
  border-color: #d4a53788;
  background: #292e37;
}
.pt-btn.primary {
  border-color: var(--pt-gold);
  background: var(--pt-gold);
  color: #17130a;
}
.pt-btn.primary:hover {
  background: var(--pt-gold-2);
}
.pt-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pt-drop {
  display: grid;
  min-height: 250px;
  place-items: center;
  text-align: center;
  border: 2px dashed #363e4c;
  border-radius: 14px;
  background: #ffffff03;
  padding: 30px;
  cursor: pointer;
}
.pt-drop:hover,
.pt-drop.drag {
  border-color: var(--pt-gold);
  background: #d4a53709;
}
.pt-drop input {
  display: none;
}
.pt-drop-icon {
  display: block;
  color: var(--pt-gold);
  font-size: 42px;
  margin-bottom: 8px;
}
.pt-drop strong {
  display: block;
  font-size: 18px;
}
.pt-drop small {
  display: block;
  margin-top: 7px;
  color: var(--pt-muted);
}
.pt-preview {
  position: relative;
  display: grid;
  min-height: 250px;
  place-items: center;
  overflow: auto;
  border: 1px solid var(--pt-line);
  border-radius: 12px;
  background: repeating-conic-gradient(#15181e 0 25%, #101319 0 50%) 50%/20px
    20px;
}
.bg-manual-tools {
  margin-top: 20px;
  border-top: 1px solid var(--pt-line);
  padding-top: 18px;
}
.bg-manual-tools > b,
.bg-manual-tools > label,
.bg-manual-tools > small { display: block; }
.bg-manual-tools > label { margin: 14px 0 6px; color: #cbd0d9; font-size: 12px; }
.bg-manual-tools > small { margin-top: 7px; color: var(--pt-muted); line-height: 1.45; }
.bg-manual-tools .pt-actions { margin-top: 10px; }
.bg-manual-tools .pt-btn.is-active {
  border-color: var(--pt-gold);
  background: #d4a5371b;
  color: var(--pt-gold-2);
}
.bg-brush-cursor {
  position: absolute;
  z-index: 4;
  display: none;
  border: 1.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #000;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
body[data-advanced-tool="background-remover"] #bgCanvas {
  cursor: crosshair;
  touch-action: none;
}
.pt-preview img,
.pt-preview canvas {
  display: block;
  max-width: 100%;
  max-height: 430px;
  object-fit: contain;
}
.pt-preview .empty {
  color: #777f8c;
  font-size: 13px;
}
.pt-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.pt-result {
  border: 1px solid var(--pt-line);
  border-radius: 10px;
  background: #0f1217;
  padding: 14px;
}
.pt-result span {
  display: block;
  color: var(--pt-muted);
  font-size: 10px;
  text-transform: uppercase;
}
.pt-result b {
  display: block;
  margin-top: 5px;
  font-size: 21px;
  color: #fff;
}
.pt-result.highlight b {
  color: var(--pt-gold-2);
}
.pt-list {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}
.pt-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--pt-line);
  border-radius: 9px;
  padding: 10px 12px;
  background: #0f1217;
}
.pt-list-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.pt-list-row small {
  color: var(--pt-muted);
}
.pt-table-wrap {
  overflow: auto;
  border: 1px solid var(--pt-line);
  border-radius: 10px;
}
.pt-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}
.pt-table th,
.pt-table td {
  padding: 10px;
  border-bottom: 1px solid var(--pt-line);
  text-align: left;
  font-size: 12px;
}
.pt-table th {
  color: var(--pt-gold-2);
  background: #0f1217;
}
.pt-table input {
  width: 100%;
  min-width: 80px;
  background: #0e1116;
  border: 1px solid #343b47;
  color: #fff;
  border-radius: 6px;
  padding: 8px;
}
.pt-table button {
  border: 0;
  background: #ff77771b;
  color: #ff9292;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
}
.invoice-preview {
  background: #fff;
  color: #1f2430;
  padding: 28px;
  min-height: 460px;
  border-radius: 10px;
  font-family: Arial, sans-serif;
}
.invoice-preview h2 {
  text-transform: none;
}
.invoice-preview table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
}
.invoice-preview th,
.invoice-preview td {
  border-bottom: 1px solid #dfe3e8;
  padding: 8px;
  text-align: left;
  font-size: 12px;
}
.invoice-preview .invoice-total {
  text-align: right;
  font-size: 14px;
  line-height: 1.8;
}
.barcode-stage {
  display: grid;
  place-items: center;
  min-height: 220px;
  background: #fff;
  border-radius: 10px;
  padding: 22px;
  overflow: auto;
}
.barcode-stage svg {
  max-width: 100%;
  height: auto;
}
.barcode-stage canvas {
  max-width: 100%;
}
.coord-map {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--pt-line);
  border-radius: 12px;
  background:
    linear-gradient(#111a21dd, #111a21dd),
    repeating-linear-gradient(0deg, transparent 0 29px, #ffffff0b 30px),
    repeating-linear-gradient(90deg, transparent 0 29px, #ffffff0b 30px);
  cursor: crosshair;
}
.coord-address-field {
  position: relative;
  margin-bottom: 18px;
}
.coord-address-field small {
  display: block;
  margin-top: 7px;
  color: var(--pt-muted);
  line-height: 1.45;
}
.coord-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}
.coord-search-row input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #343b47;
  border-radius: 9px;
  background: #0e1116;
  color: #fff;
  padding: 10px 13px;
  font: inherit;
}
.coord-suggestions {
  position: absolute;
  z-index: 12;
  top: calc(100% - 22px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--pt-line);
  border-radius: 10px;
  background: #171a21;
  box-shadow: 0 18px 45px #0009;
}
.coord-suggestions button {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--pt-line);
  background: transparent;
  color: var(--pt-text);
  padding: 11px 13px;
  text-align: left;
  cursor: pointer;
}
.coord-suggestions button:last-child { border-bottom: 0; }
.coord-suggestions button:hover { background: #d4a53716; }
.coord-suggestions b,
.coord-suggestions span { display: block; }
.coord-suggestions span {
  margin-top: 3px;
  overflow: hidden;
  color: var(--pt-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coord-map-live {
  overflow: hidden;
  height: 360px;
  margin-bottom: 14px;
  border: 1px solid var(--pt-line);
  border-radius: 12px;
  background: #0f1217;
}
.coord-map-live iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
body[data-advanced-tool="latitude-longitude-finder"] .coord-map {
  min-height: 105px;
}
.coord-map::before {
  content: "Click anywhere to estimate coordinates";
  position: absolute;
  left: 12px;
  top: 10px;
  color: #87909c;
  font-size: 11px;
}
.coord-map .equator {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #d4a53755;
}
.coord-map .meridian {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px solid #d4a53755;
}
.coord-pin {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  background: var(--pt-gold);
  transform: translate(-50%, -100%) rotate(-45deg);
  box-shadow: 0 4px 16px #000;
}
.coord-pin::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #15120a;
  left: 6px;
  top: 6px;
}
.pt-chart {
  width: 100%;
  height: 220px;
  border: 1px solid var(--pt-line);
  border-radius: 10px;
  background: #0f1217;
  margin-top: 16px;
}
.pt-seo {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 80px;
}
.pt-seo h2 {
  margin: 42px 0 12px;
  font-size: clamp(25px, 4vw, 38px);
  text-transform: none;
}
.pt-seo h3 {
  margin: 25px 0 8px;
  text-transform: none;
  font-size: 19px;
}
.pt-seo p,
.pt-seo li {
  color: var(--pt-muted);
  font-size: 15px;
  line-height: 1.75;
}
.pt-seo ul,
.pt-seo ol {
  padding-left: 22px;
}
.pt-related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.pt-related a {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--pt-line);
  border-radius: 10px;
  background: var(--pt-panel);
  padding: 15px;
  color: #dce0e7;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 9px 24px #0002;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.pt-related a::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--pt-gold-2), var(--pt-gold));
}
.pt-related a:hover {
  border-color: var(--pt-gold);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 15px 35px #0004;
}
.pt-status {
  min-height: 20px;
  margin-top: 12px;
  color: var(--pt-muted);
  font-size: 12px;
}
.pt-status.ok {
  color: var(--pt-green);
}
.pt-status.error {
  color: var(--pt-red);
}
@media (max-width: 800px) {
  .pt-hero {
    padding-top: 118px;
  }
  .pt-grid,
  .pt-grid.equal {
    grid-template-columns: 1fr;
  }
  .pt-results {
    grid-template-columns: 1fr 1fr;
  }
  .pt-related {
    grid-template-columns: 1fr 1fr;
  }
  .pt-app-body {
    padding: 16px;
  }
  .invoice-preview {
    padding: 18px;
  }
}
@media (max-width: 520px) {
  .pt-main {
    width: min(100% - 20px, 1120px);
  }
  .pt-hero {
    padding-inline: 14px;
  }
  .pt-fields {
    grid-template-columns: 1fr;
  }
  .pt-field.full {
    grid-column: auto;
  }
  .pt-results {
    grid-template-columns: 1fr;
  }
  .pt-related {
    grid-template-columns: 1fr;
  }
  .pt-actions .pt-btn {
    flex: 1;
  }
  .pt-drop {
    min-height: 210px;
    padding: 20px;
  }
  .pt-app-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .coord-map {
    min-height: 240px;
  }
  body[data-advanced-tool="latitude-longitude-finder"] .coord-map {
    min-height: 100px;
  }
  .coord-search-row { grid-template-columns: 1fr; }
  .coord-map-live { height: 290px; }
}
@media print {
  header,
  .nlm-footer,
  .nlm-mobile-nav,
  .pt-hero,
  .pt-app-head,
  .pt-card:not(.invoice-output),
  .pt-actions,
  .pt-seo {
    display: none !important;
  }
  body {
    background: #fff !important;
  }
  .pt-main,
  .pt-app,
  .pt-app-body,
  .pt-grid {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    display: block !important;
  }
  .invoice-preview {
    min-height: auto;
    padding: 0;
  }
}
