html,
body {
  overflow-x: hidden !important;
  background: #050608 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.avpm-docs-app {
  --bg: #050608;
  --tile: #141922;
  --tile2: #1a2029;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.12);
  --text: #f7f9fc;
  --muted: #aab4c2;
  --muted2: #8d98a8;
  --yellow: #f4c315;
  --green: #22c55e;
  --red: #d01822;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 10%, rgba(255,255,255,.04), transparent 20%),
    radial-gradient(circle at 88% 12%, rgba(255,255,255,.03), transparent 18%),
    linear-gradient(180deg, #050608 0%, #080b10 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

.avpm-docs-app form.is-processing {
  position: relative;
}

.avpm-docs-app button[type="submit"].is-processing {
  position: relative;
  padding-left: 46px;
  cursor: wait;
}

.avpm-docs-app button[type="submit"].is-processing::before {
  content: "";
  position: absolute;
  left: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  animation: avpm-docs-spin .75s linear infinite;
}

@keyframes avpm-docs-spin {
  to { transform: rotate(360deg); }
}

.avpm-docs-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(5,6,8,.72);
  backdrop-filter: blur(10px);
}

.avpm-docs-result-overlay.is-open {
  display: grid;
}

.avpm-docs-result-card {
  position: relative;
  width: min(560px, 100%);
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(180deg,#1b212c,#111722);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 28px 80px rgba(0,0,0,.42);
  color: #fff;
  text-align: center;
}

.avpm-docs-result-card::before {
  content: "";
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(34,197,94,.16);
  border: 1px solid rgba(34,197,94,.32);
}

.avpm-docs-result-overlay[data-kind="error"] .avpm-docs-result-card::before {
  background: rgba(208,24,34,.16);
  border-color: rgba(208,24,34,.34);
}

.avpm-docs-result-kicker {
  margin-bottom: 8px;
  color: #f4c315;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 900;
}

.avpm-docs-result-card h3 {
  margin: 0 0 10px;
  font-size: clamp(28px,5vw,42px);
  line-height: 1;
  letter-spacing: -.04em;
}

.avpm-docs-result-card p {
  margin: 0;
  color: #dbe4f0;
  line-height: 1.65;
  font-size: 15px;
}

.avpm-docs-result-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* =========================
   TOP BAR / LOGO BAND
========================= */

.avpm-docs-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(5, 6, 8, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 0 !important;
  margin: 0 !important;
}

body.admin-bar .avpm-docs-topbar {
  top: 32px;
}

.avpm-docs-topbar-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  height: 88px;
  min-height: 88px;
  padding: 4px 18px 2px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  box-sizing: border-box;
  overflow: visible;
}

.avpm-docs-topbar-spacer {
  width: 44px;
  min-width: 44px;
  min-height: 1px;
}

.avpm-docs-logo-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0;
  gap: 0;
  text-decoration: none;
  overflow: visible;
}

/*
  The logo image appears to have transparent space built into it.
  We enlarge the visible mark while keeping the bar height fixed.
*/
.avpm-docs-brand-logo {
  width: 210px;
  max-width: 210px;
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0;
  transform: scale(1.38);
  transform-origin: center center;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
}

.avpm-docs-brand-license {
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
  color: var(--muted2);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.avpm-docs-menu {
  justify-self: end;
  position: relative;
}

.avpm-docs-menu summary {
  list-style: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: rgba(255,255,255,.06);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.avpm-docs-menu summary::-webkit-details-marker {
  display: none;
}

.avpm-docs-menu summary span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  margin: 2px 0;
}

.avpm-docs-menu-panel {
  position: absolute;
  right: 0;
  top: 54px;
  min-width: 240px;
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--line2);
  background: linear-gradient(180deg, #171c24, #11161d);
  box-shadow: var(--shadow);
}

.avpm-docs-menu-panel a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  padding: 12px 14px;
  border-radius: 12px;
}

.avpm-docs-menu-panel a:hover {
  background: rgba(255,255,255,.06);
}

/* =========================
   MAIN / HERO
========================= */

.avpm-docs-main-full {
  width: 100%;
  min-height: calc(100vh - 88px);
}

.avpm-docs-hero,
.avpm-docs-content-wide {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 18px;
  padding-right: 18px;
  box-sizing: border-box;
}

.avpm-docs-hero {
  padding-top: 12px;
  padding-bottom: 10px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

.avpm-docs-header-kicker {
  color: var(--red);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 900;
  margin: 0 0 4px;
}

.avpm-docs-header-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 950;
  color: #fff;
}

.avpm-docs-header-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 1200px;
}

.avpm-docs-chip-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-right: 0;
  padding-right: 0;
}

.avpm-docs-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line2);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.avpm-docs-chip.secure {
  margin-right: 0;
}

.avpm-docs-chip.secure::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(34,197,94,.14);
  margin-right: 8px;
}

/* =========================
   CONTENT / FORM
========================= */

.avpm-docs-content {
  padding: 8px 0 22px;
  width: 100%;
  box-sizing: border-box;
}

.avpm-docs-panel.active {
  display: block;
}

.avpm-docs-card {
  display: block;
  width: 100%;
  max-width: none;
  background: linear-gradient(180deg, var(--tile2), var(--tile));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.avpm-docs-form,
.avpm-docs-grid,
.avpm-docs-grid label,
.avpm-docs-section {
  min-width: 0;
}

.avpm-docs-form {
  display: grid;
  gap: 18px;
  width: 100%;
}

.avpm-docs-grid.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.avpm-docs-grid.two-up > label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.avpm-docs-form label > span {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.avpm-docs-form input[type="text"],
.avpm-docs-form input[type="email"],
.avpm-docs-form input[type="tel"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line2);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 15px;
  outline: none;
}

.avpm-docs-form input::placeholder {
  color: #8d98a8;
}

.avpm-docs-form input:focus {
  border-color: rgba(244,195,21,.45);
  box-shadow: 0 0 0 3px rgba(244,195,21,.08);
}

.avpm-docs-section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,.02);
  width: 100%;
  box-sizing: border-box;
}

.avpm-docs-section-head h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 18px;
  line-height: 1.1;
}

.avpm-docs-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.avpm-docs-form input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.04);
  color: #dce4ef;
}

.avpm-docs-help {
  color: var(--muted2);
  font-size: 12px;
}

.avpm-docs-file-list {
  display: grid;
  gap: 8px;
}

.avpm-docs-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}

.avpm-docs-file-item strong {
  display: block;
  color: #fff;
  font-size: 14px;
  word-break: break-word;
}

.avpm-docs-file-item div {
  color: var(--muted);
  font-size: 12px;
}

.avpm-docs-file-item button {
  border: 0;
  background: #303743;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 auto;
}

.avpm-docs-actions {
  display: flex;
  justify-content: flex-start;
}

.avpm-docs-actions button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f4c315, #f8d857);
  color: #101318;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(244,195,21,.24);
}

.avpm-docs-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.avpm-docs-status {
  min-height: 52px;
  display: flex;
  align-items: center;
  border-radius: 14px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--line);
}

.avpm-docs-status.is-info {
  background: rgba(96,165,250,.12);
  color: #dbeafe;
  border-color: rgba(96,165,250,.22);
}

.avpm-docs-status.is-success {
  background: rgba(34,197,94,.12);
  color: #dcfce7;
  border-color: rgba(34,197,94,.24);
}

.avpm-docs-status.is-warning {
  background: rgba(244,195,21,.12);
  color: #fde68a;
  border-color: rgba(244,195,21,.24);
}

.avpm-docs-status.is-error {
  background: rgba(208,24,34,.14);
  color: #fecaca;
  border-color: rgba(208,24,34,.24);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
  .avpm-docs-topbar-inner {
    height: 78px;
    min-height: 78px;
    padding: 4px 12px 2px;
    grid-template-columns: 40px 1fr 40px;
  }

  .avpm-docs-topbar-spacer {
    width: 40px;
    min-width: 40px;
  }

  .avpm-docs-logo-link {
    height: 36px;
    min-height: 36px;
  }

  .avpm-docs-brand-logo {
    width: 180px;
    max-width: 180px;
    transform: scale(1.3);
  }

  .avpm-docs-brand-license {
    font-size: 9px;
    top: calc(100% + 1px);
  }

  .avpm-docs-main-full {
    min-height: calc(100vh - 78px);
  }

  .avpm-docs-hero,
  .avpm-docs-content-wide {
    padding-left: 12px;
    padding-right: 12px;
  }

  .avpm-docs-hero {
    padding-top: 10px;
    padding-bottom: 8px;
  }

  .avpm-docs-card {
    padding: 16px 12px;
    border-radius: 18px;
  }
}

@media (max-width: 768px) {
  .avpm-docs-grid.two-up {
    grid-template-columns: 1fr;
  }

  body.admin-bar .avpm-docs-topbar {
    top: 46px;
  }
}
