/* ==========================================================================
   Public and sign-in pages: split layout, form on the left and the brand
   panel on the right (same structure as yourcryptopal.com/sign-in).
   ========================================================================== */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--surface);
}

.auth-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 1.5rem clamp(1.25rem, 5vw, 4rem);
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 2.5rem 0;
}
.auth-content.wide {
  max-width: 620px;
}

.auth-content h1 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.auth-lead {
  margin-top: 0.4rem;
  margin-bottom: 1.75rem;
  color: var(--text-2);
}

.auth-foot {
  margin-top: 1.5rem;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.auth-foot a {
  font-weight: 700;
}

.auth-legal {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: center;
}

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 1rem 1rem 1rem 0;
  padding: clamp(2rem, 4vw, 3.5rem);
  border-radius: 20px;
  overflow: hidden;
  color: #fff;
  background: var(--brand-gradient);
  isolation: isolate;
}
.auth-aside::before {
  /* Optional photo (set with --auth-image), tinted with the brand gradient. */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--auth-image, none);
  background-size: cover;
  background-position: center;
}
.auth-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 85% 12%, rgba(94, 163, 224, 0.35), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.08), transparent 40%),
    var(--brand-gradient-soft);
}
.auth-aside .aside-logo img {
  height: 38px;
  width: auto;
}
.auth-aside .aside-copy {
  max-width: 460px;
}
.auth-aside h2 {
  color: #fff;
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
}
.auth-aside p {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--fs-md);
}
.aside-points {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}
.aside-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-sm);
}
.aside-points svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 0.1rem;
  color: #9fd0ff;
}
.aside-foot {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.6);
}

.password-toggle {
  min-width: 64px;
  justify-content: center;
  cursor: pointer;
}

.method-list {
  display: grid;
  gap: 0.6rem;
}
.method-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.method-option:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.method-option .icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  flex: none;
}
.method-option .icon-wrap svg {
  width: 20px;
  height: 20px;
}
.method-option strong {
  display: block;
  font-size: var(--fs-sm);
}
.method-option span.desc {
  display: block;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.qr-box {
  display: flex;
  justify-content: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.qr-box img,
.qr-box canvas,
.qr-box svg {
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
}

.status-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.status-panel .big-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}
.status-panel .big-icon svg {
  width: 26px;
  height: 26px;
}
.status-panel .big-icon.ok {
  background: var(--ok-soft);
  color: var(--ok-text);
}
.status-panel .big-icon.danger {
  background: var(--danger-soft);
  color: var(--danger-text);
}

/* Public application page (index.html) */
.apply-form {
  display: grid;
  gap: 1rem;
}
.apply-form .field + .field {
  margin-top: 0;
}
.apply-form .grid-2 {
  --gap: 1rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.apply-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.75rem;
  padding: 0;
}
.apply-steps li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: var(--fs-xs);
  color: var(--text-2);
}
.apply-steps strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: var(--fs-sm);
  color: var(--text);
}
.apply-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}
.apply-step-icon svg {
  width: 16px;
  height: 16px;
}

.choice-group {
  margin-inline: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.choice-group legend {
  padding: 0;
}
.choice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.choice-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.choice-chip input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--primary);
}
.choice-chip:hover {
  border-color: var(--primary);
}
.choice-chip:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
}
.choice-chip:has(input:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Honeypot: off-screen for people, still in the form for bots. */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 560px) {
  .apply-steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .apply-steps li {
    flex-direction: row;
    align-items: flex-start;
  }
  .apply-step-icon {
    flex: none;
  }
}

@media (max-width: 960px) {
  .auth {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-aside {
    display: none;
  }
}
