:root {
  --pm-red: #e31c25;
  --pm-red-dark: #c4171f;
  --pm-red-soft: #ffe8e9;
  --pm-ink: #1a1d21;
  --pm-muted: #5c6570;
  --pm-line: #e8ecf0;
  --pm-bg: #ffffff;
  --pm-bg-soft: #f7f8fa;
  --pm-shadow: 0 12px 40px rgba(26, 29, 33, 0.08);
  --pm-radius: 16px;
  --pm-font: "DM Sans", system-ui, sans-serif;
  --pm-display: "Outfit", "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--pm-font);
  color: var(--pm-ink);
  background: var(--pm-bg);
  line-height: 1.6;
  position: relative;
}

/* Override Identity / template absolute footer that collapses layout */
body > .footer,
.footer {
  position: static !important;
  bottom: auto !important;
  width: 100%;
  white-space: normal !important;
  line-height: inherit !important;
}

main {
  flex: 1 0 auto;
  width: 100%;
  min-height: 0;
}

a {
  color: var(--pm-red);
  text-decoration: none;
}

a:hover {
  color: var(--pm-red-dark);
}

.pm-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--pm-line);
}

.pm-header .navbar {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.pm-brand {
  font-family: var(--pm-display);
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--pm-ink) !important;
  letter-spacing: -0.03em;
  white-space: nowrap;
  word-break: normal;
  text-align: left;
}

.pm-brand-lg {
  font-size: 1.75rem;
}

.pm-brand-mark {
  color: var(--pm-red);
}

.pm-nav .nav-link {
  color: var(--pm-ink) !important;
  font-weight: 500;
  padding: 0.55rem 0.85rem !important;
}

.pm-nav .nav-link:hover {
  color: var(--pm-red) !important;
}

.btn-pm {
  background: var(--pm-red);
  border: 1px solid var(--pm-red);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
}

.btn-pm:hover,
.btn-pm:focus {
  background: var(--pm-red-dark);
  border-color: var(--pm-red-dark);
  color: #fff;
}

.btn-pm:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-outline-pm {
  border: 1px solid var(--pm-line);
  color: var(--pm-ink);
  background: transparent;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
}

.btn-outline-pm:hover {
  border-color: var(--pm-red);
  color: var(--pm-red);
  background: var(--pm-red-soft);
}

.pm-hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(227, 28, 37, 0.12), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(227, 28, 37, 0.08), transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--pm-bg-soft) 100%);
}

.pm-hero-title {
  font-family: var(--pm-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1rem;
  max-width: 18ch;
}

.pm-hero-lead {
  color: var(--pm-muted);
  font-size: 1.125rem;
  max-width: 42ch;
  margin-bottom: 2rem;
}

.pm-upload-zone {
  display: block;
  width: 100%;
  background: #fff;
  border: 2px dashed #d7dde5;
  border-radius: calc(var(--pm-radius) + 4px);
  padding: 2.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--pm-shadow);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  cursor: pointer;
  min-height: 220px;
  height: auto;
  position: relative;
  z-index: 1;
}

.pm-upload-zone.is-dragover {
  border-color: var(--pm-red);
  background: var(--pm-red-soft);
  transform: translateY(-2px);
}

.pm-upload-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pm-red-soft);
  color: var(--pm-red);
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.pm-section {
  padding: 3rem 0;
}

.pm-section-muted {
  background: var(--pm-bg-soft);
}

.pm-section-title {
  font-family: var(--pm-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.pm-section-lead {
  color: var(--pm-muted);
  margin-bottom: 1.25rem;
}

.pm-tool-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: var(--pm-radius);
  padding: 1.25rem;
  height: 100%;
  min-height: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.pm-tool-card .min-w-0 {
  min-width: 0;
}

.pm-tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pm-shadow);
  border-color: #f0c4c6;
  color: inherit;
}

.pm-tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.pm-tool-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.pm-tool-card p {
  margin: 0;
  color: var(--pm-muted);
  font-size: 0.92rem;
}

.pm-step {
  background: #fff;
  border-radius: var(--pm-radius);
  padding: 1.5rem;
  border: 1px solid var(--pm-line);
  height: 100%;
}

.pm-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pm-red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 1rem;
}

.pm-plan,
.pm-panel {
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: calc(var(--pm-radius) + 4px);
  padding: 1.5rem;
  height: auto;
  min-height: 0;
  position: relative;
  z-index: 1;
}

/* Equal-height pricing cards only (explicit class — never tool options) */
.pm-pricing-row > [class*="col"] > .pm-plan {
  height: 100%;
}

/* Tool workspace panels must hug content and stay above the footer */
.pm-tool-workspace .pm-panel,
.pm-tool-workspace .pm-plan {
  height: auto !important;
  min-height: 0 !important;
  margin-bottom: 0;
}

.pm-plan.is-featured {
  border-color: var(--pm-red);
  box-shadow: var(--pm-shadow);
}

.pm-plan-price {
  font-family: var(--pm-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.pm-plan-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--pm-muted);
}

.pm-faq .accordion-button {
  font-weight: 600;
  box-shadow: none !important;
}

.pm-faq .accordion-button:not(.collapsed) {
  background: var(--pm-red-soft);
  color: var(--pm-ink);
}

.pm-footer {
  flex: 0 0 auto;
  position: static !important;
  background: #121417;
  color: #c9ced6;
  padding: 4rem 0 1.5rem;
  margin-top: auto;
  width: 100%;
  white-space: normal;
  line-height: 1.6;
  z-index: 0;
}

.pm-footer .pm-brand {
  color: #fff !important;
}

.pm-footer-heading {
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
}

.pm-footer-text {
  color: #9aa3ad;
  font-size: 0.95rem;
}

.pm-footer-links a {
  color: #9aa3ad;
  display: inline-block;
  margin-bottom: 0.45rem;
}

.pm-footer-links a:hover {
  color: #fff;
}

.pm-footer-bottom {
  border-top: 1px solid #2a3038;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  font-size: 0.9rem;
  color: #7e8792;
}

.pm-page-hero {
  padding: 2rem 0 1.25rem;
  background: var(--pm-bg-soft);
  border-bottom: 1px solid var(--pm-line);
}

.pm-tool-workspace {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.pm-tool-workspace .row,
.pm-tool-workspace [class*="col"] {
  align-items: flex-start;
  height: auto;
}

.pm-tool-workspace .pm-upload-zone,
.pm-tool-workspace .pm-panel,
.pm-tool-workspace .pm-plan,
.pm-tool-workspace .btn-pm {
  max-width: 100%;
}

.pm-file-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  text-align: left;
}

.pm-file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--pm-line);
  border-radius: 12px;
  margin-bottom: 0.65rem;
  background: #fff;
}

.pm-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--pm-line);
  overflow: hidden;
  margin-top: 1rem;
  display: none;
}

.pm-progress-bar {
  height: 100%;
  width: 0;
  background: var(--pm-red);
  transition: width 0.2s ease;
}

.pm-badge {
  display: inline-block;
  background: var(--pm-red-soft);
  color: var(--pm-red);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

/* Auth pages (Login / Register) */
.pm-auth-card {
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: calc(var(--pm-radius) + 4px);
  box-shadow: var(--pm-shadow);
  padding: 2rem 1.75rem;
  height: auto;
}

.pm-auth-brand .pm-brand {
  font-size: 1.2rem;
}

.pm-auth-label {
  font-size: 0.875rem;
}

.pm-auth-input {
  border-radius: 10px;
  border-color: var(--pm-line);
  font-size: 0.875rem;
  padding: 0.55rem 0.85rem;
}

.pm-auth-input::placeholder {
  font-size: 0.8125rem;
  color: #9aa3ad;
}

.pm-auth-input:focus {
  border-color: var(--pm-red);
  box-shadow: 0 0 0 0.15rem rgba(227, 28, 37, 0.12);
}

.pm-auth-remember .form-check-label {
  font-size: 0.8125rem;
  color: var(--pm-muted);
}

.pm-auth-remember .form-check-input {
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.2rem;
}

.pm-password-field {
  position: relative;
}

.pm-password-field .pm-auth-input,
.pm-password-field .form-control {
  padding-right: 2.75rem;
}

.pm-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--pm-muted);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

.pm-password-toggle:hover,
.pm-password-toggle:focus {
  color: var(--pm-red);
  background: var(--pm-red-soft);
  outline: none;
}

.pm-auth-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.95rem;
}

.pm-auth-links a {
  color: var(--pm-muted);
}

.pm-auth-links a:hover {
  color: var(--pm-red);
}

@media (max-width: 991.98px) {
  .pm-hero {
    padding-top: 3rem;
  }

  .pm-auth-nav {
    margin-top: 1rem;
  }

  .pm-section {
    padding: 2.25rem 0;
  }
}
