:root {
  --auth-bg: #eef1f6;
  --auth-surface: rgba(255, 255, 255, 0.98);
  --auth-surface-soft: #f6f7fb;
  --auth-border: #dce2ea;
  --auth-text: #24313d;
  --auth-text-muted: #65717e;
  --auth-title: #17212b;
  --auth-accent: #714b67;
  --auth-accent-soft: rgba(113, 75, 103, 0.08);
  --auth-shadow: 0 24px 56px rgba(15, 23, 42, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.public-auth-body {
  min-height: 100vh;
  margin: 0;
  background: var(--auth-bg);
  color: var(--auth-text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

.public-auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.public-auth-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(380px, 1fr);
  gap: 1.25rem;
}

.public-auth-hero,
.public-auth-card {
  border: 1px solid var(--auth-border);
  border-radius: 24px;
  background: var(--auth-surface);
  box-shadow: var(--auth-shadow);
}

.public-auth-hero {
  padding: 2rem;
  background: linear-gradient(180deg, #2e3348 0%, #24293b 100%);
  color: #edf1f6;
}

.public-auth-card {
  padding: 2rem;
}

.public-auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--auth-accent-soft);
  color: var(--auth-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.public-auth-hero .public-auth-kicker {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.public-auth-title {
  margin: 1rem 0 0.45rem;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.1;
  color: var(--auth-title);
}

.public-auth-hero .public-auth-title {
  color: #fff;
}

.public-auth-copy {
  margin: 0;
  color: var(--auth-text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.public-auth-hero .public-auth-copy,
.public-auth-hero .public-auth-list {
  color: rgba(255, 255, 255, 0.82);
}

.public-auth-list {
  margin: 1.4rem 0 0;
  padding-left: 1.1rem;
  line-height: 1.7;
}

.public-auth-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.public-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.82rem;
}

.public-auth-card-head {
  margin-bottom: 1.25rem;
}

.public-auth-card-title {
  margin: 0.9rem 0 0.35rem;
  font-size: 1.7rem;
  color: var(--auth-title);
}

.public-auth-card-copy {
  margin: 0;
  color: var(--auth-text-muted);
  line-height: 1.6;
}

.public-auth-form-row + .public-auth-form-row {
  margin-top: 1rem;
}

.public-auth-form-row .form-label {
  font-weight: 600;
}

.public-auth-info-panel {
  margin: 0 0 1.2rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  background: var(--auth-surface-soft);
}

.public-auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 1.2rem;
}

.public-auth-qr {
  width: 100%;
  max-width: 220px;
  border-radius: 18px;
  border: 1px solid var(--auth-border);
  background: #fff;
  padding: 0.7rem;
}

.public-auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1.1rem;
  color: var(--auth-text-muted);
  font-size: 0.92rem;
}

.public-auth-links a {
  color: var(--auth-accent);
  text-decoration: none;
  font-weight: 600;
}

.public-auth-code-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.public-auth-code {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  background: var(--auth-surface-soft);
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .public-auth-layout,
  .public-auth-grid {
    grid-template-columns: 1fr;
  }

  .public-auth-hero {
    order: 2;
  }
}

@media (max-width: 640px) {
  .public-auth-shell {
    padding: 1rem;
  }

  .public-auth-card,
  .public-auth-hero {
    padding: 1.35rem;
    border-radius: 20px;
  }

  .public-auth-code-grid {
    grid-template-columns: 1fr;
  }
}
