/* صفحهٔ مشترک کلیدها؛ تمام رنگ‌ها از تم جاری می‌آیند و تصویرسازی کاملاً محلی است. */
.public-keys {
  max-width: 1240px;
  padding: 24px 32px 40px;
  margin: auto;
}
.public-keys-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.public-keys-header .brand {
  margin: 0;
  max-width: 300px;
}
.public-keys-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.key-generator {
  position: relative;
  isolation: isolate;
  max-width: 1240px;
  margin: 0 auto;
  color: var(--text-primary);
}
.key-generator::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 500px;
  border-radius: 28px;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 20% 10%,
    var(--accent-surface),
    transparent 65%
  );
}
.key-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 270px;
  align-items: center;
  gap: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(
    115deg,
    var(--accent-surface),
    var(--surface) 72%
  );
  padding: 30px 38px;
  margin-bottom: 24px;
}
.key-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
.key-eyebrow svg {
  font-size: 21px;
}
.key-hero h1 {
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 850;
  line-height: 1.7;
  margin: 10px 0;
}
.key-hero-copy > p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 2;
  margin: 0 0 23px;
}
.key-steps {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.key-steps li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
}
.key-steps b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
}
.key-steps b svg {
  font-size: 21px;
}
.key-steps .is-ready {
  color: var(--accent);
}
/* مدارهای آرامِ تزئینی مستقل از فرم هستند؛ ترجیح کاهش حرکت در انتهای فایل رعایت می‌شود. */
.key-art {
  position: relative;
  min-height: 205px;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.key-art-orbit {
  position: absolute;
  width: 205px;
  height: 205px;
  border: 1px dashed color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: 50%;
  animation: key-orbit 55s linear infinite;
}
.key-art-orbit-inner {
  width: 145px;
  height: 145px;
  border-style: solid;
  border-color: var(--line);
  animation: none;
}
.key-art-center {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 15px 38px color-mix(in srgb, var(--brand) 15%, transparent);
  transform: rotate(-12deg);
}
.key-art-center svg {
  font-size: 49px;
  transform: rotate(12deg);
}
.key-art-label {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 7px 22px color-mix(in srgb, var(--brand) 8%, transparent);
  font: 700 10px sans-serif;
  animation: key-float 6s ease-in-out infinite;
}
.key-art-label svg {
  font-size: 17px;
}
.key-art-label-one {
  top: 5px;
  right: 5px;
}
.key-art-label-two {
  bottom: 23px;
  right: 0;
  animation-delay: -2s;
}
.key-art-label-three {
  top: 80px;
  left: -4px;
  animation-delay: -4s;
}
.key-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}
.key-form-card.MuiPaper-root,
.key-download-section.MuiPaper-root {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 10px 34px color-mix(in srgb, var(--brand) 5%, transparent);
}
.key-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.key-section-heading > div {
  flex: 1;
  min-width: 0;
}
.key-section-heading h2 {
  font-size: 19px;
  font-weight: 800;
}
.key-section-heading p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.9;
}
.key-section-heading .MuiChip-root {
  flex: 0 0 auto;
  background: var(--accent-surface);
  color: var(--accent);
  font-size: 11px;
  flex-shrink: 0;
}
.key-section-icon,
.key-file-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--accent-surface);
  color: var(--accent);
  width: 44px;
  height: 44px;
  border-radius: 14px;
}
.key-profile-hint {
  margin: 10px 0 25px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.9;
}
.key-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
}
.key-field-wide {
  grid-column: 1/-1;
}
.key-fields .MuiInputBase-root {
  background: var(--muted-surface);
  transition:
    background 0.2s,
    box-shadow 0.2s;
}
.key-fields .Mui-focused {
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-surface);
}
.key-submit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 23px;
  margin-top: 26px;
}
.key-submit-row .MuiButton-root {
  padding: 12px 20px;
  border-radius: 12px;
}
.key-submit-row > span {
  color: var(--text-muted);
  font-size: 11px;
}
.key-guidance {
  padding: 25px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--muted-surface);
}
.key-guidance-heading h2 {
  font-size: 22px;
  font-weight: 800;
  margin-top: 5px;
}
.key-guidance-heading > p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 2;
  margin: 7px 0 21px;
}
.key-file-guide {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 17px 0;
}
.key-file-guide .key-file-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--surface);
}
.key-file-guide strong {
  font-size: 13px;
}
.key-file-guide p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.9;
  margin: 4px 0 0;
}
.key-guidance > .MuiButton-root {
  max-width: 100%;
  white-space: normal;
  text-align: start;
  line-height: 1.9;
  font-size: 11px;
  padding: 9px 0;
}
.key-download-section.MuiPaper-root {
  margin-top: 24px;
  animation: key-reveal 0.4s ease both;
}
.key-download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.key-download-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--muted-surface);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.key-download-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 22px color-mix(in srgb, var(--brand) 10%, transparent);
}
.key-download-tag {
  position: absolute;
  inset-inline-end: 15px;
  top: 20px;
  font: 700 9px sans-serif;
  color: var(--text-muted);
  letter-spacing: 0.7px;
}
.key-download-card h3 {
  font-size: 15px;
  font-weight: 800;
  margin-top: 6px;
}
.key-filename {
  color: var(--text-muted);
  font-size: 12px;
}
.key-download-card .MuiButton-root {
  align-self: stretch;
  margin-top: 9px;
  border-radius: 10px;
  background: var(--surface);
}
.key-storage-note {
  display: flex;
  gap: 10px;
  padding: 20px 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 2;
}
.key-storage-note > svg {
  font-size: 19px;
  flex-shrink: 0;
  margin-top: 4px;
  color: var(--accent);
}
.key-storage-note p {
  margin: 0;
}
.key-storage-note strong {
  color: var(--text-primary);
}
@keyframes key-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}
@keyframes key-orbit {
  to {
    transform: rotate(360deg);
  }
}
@keyframes key-reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* در پنل باریک و موبایل، ستون راهنما زیر فرم قرار می‌گیرد؛ اسکرول افقی لازم نیست. */
@media (max-width: 1100px) {
  .key-workspace {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 18px;
  }
  .key-hero {
    grid-template-columns: 1fr 210px;
    padding: 26px;
  }
  .key-form-card.MuiPaper-root {
    padding: 24px;
  }
  .key-art-label-three {
    left: -10px;
  }
}
@media (max-width: 900px) {
  .key-workspace {
    grid-template-columns: 1fr;
  }
  .key-guidance {
    padding: 24px;
  }
  .key-art {
    min-height: 180px;
  }
  .key-art-orbit {
    width: 180px;
    height: 180px;
  }
  .key-art-orbit-inner {
    width: 130px;
    height: 130px;
  }
  .key-section-heading h2 {
    font-size: 18px;
  }
}
@media (max-width: 620px) {
  .public-keys {
    padding: 16px 14px 24px;
  }
  .public-keys-header {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .public-keys-header .brand {
    max-width: 260px;
  }
  .public-keys-actions {
    width: 100%;
    justify-content: space-between;
  }
  .key-hero {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 8px;
    border-radius: 22px;
  }
  .key-hero h1 {
    font-size: 26px;
  }
  .key-hero-copy > p {
    font-size: 13px;
  }
  .key-art {
    min-height: 165px;
    width: 225px;
    justify-self: center;
  }
  .key-art-orbit {
    width: 155px;
    height: 155px;
  }
  .key-art-orbit-inner {
    width: 115px;
    height: 115px;
  }
  .key-art-center {
    width: 75px;
    height: 75px;
    border-radius: 22px;
  }
  .key-art-center svg {
    font-size: 40px;
  }
  .key-art-label-one {
    right: 0;
  }
  .key-art-label-two {
    bottom: 5px;
  }
  .key-art-label-three {
    left: 0;
  }
  .key-steps {
    gap: 10px 14px;
  }
  .key-steps li {
    font-size: 11px;
  }
  .key-steps b {
    width: 23px;
    height: 23px;
  }
  .key-fields,
  .key-download-grid {
    grid-template-columns: 1fr;
  }
  .key-form-card.MuiPaper-root,
  .key-download-section.MuiPaper-root {
    min-width: 0;
    padding: 22px 17px;
  }
  .key-section-heading {
    gap: 9px;
    flex-wrap: wrap;
  }
  .key-section-heading .MuiChip-root {
    display: none;
  }
  .key-submit-row .MuiButton-root {
    width: 100%;
  }
  .key-submit-row > span {
    width: 100%;
    text-align: center;
  }
  .key-download-card {
    padding: 18px;
  }
  .key-guidance {
    padding: 23px 20px;
  }
  .key-storage-note {
    padding-inline: 2px;
  }
  .key-hero-copy {
    min-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .key-art-orbit,
  .key-art-label,
  .key-download-section.MuiPaper-root {
    animation: none;
  }
  .key-fields .MuiInputBase-root,
  .key-download-card {
    transition: none;
  }
  .key-download-card:hover {
    transform: none;
  }
}

/* فرم عمومی در پوستهٔ سایت؛ مستقل از سبک و مسیرهای پنل. */
.public-account-form{margin-block:30px;scroll-margin-top:110px;min-width:0}
.public-account-form .registration-embedded{color:var(--text-primary);padding:0;margin:0}
.registration-embedded .registration-shell{max-width:820px;margin:auto;min-width:0}
.registration-embedded .registration-form-card{padding:32px;border:1px solid var(--line);border-radius:24px;background:var(--surface);box-shadow:0 10px 34px color-mix(in srgb,var(--brand) 5%,transparent)}
.registration-embedded .registration-form-heading{display:grid;gap:8px}
.registration-embedded .registration-form-heading h2{font-size:26px;line-height:1.6;margin:0}
.registration-embedded .registration-form-kicker{color:var(--accent);font-size:12px;font-weight:700}
.registration-embedded .registration-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin-block:24px}
.registration-embedded .registration-mobile,.registration-embedded .registration-phone-check{grid-column:1/-1;min-width:0}
.registration-embedded .registration-phone-check{display:grid;gap:16px}
.registration-embedded .registration-footer{gap:8px;border-top:1px solid var(--line);padding-top:16px}
.registration-embedded .registration-retry{display:grid;gap:12px}
.public-account-form button,.public-account-form input{font:inherit}
.public-account-form h2,.public-account-form h3{letter-spacing:normal}
@media(max-width:620px){.registration-embedded .registration-form-card{padding:22px 17px}.registration-embedded .registration-fields{grid-template-columns:1fr}.public-account-form{margin-block:22px}.registration-embedded .registration-form-heading h2{font-size:22px}}
