:root {
  --auth-bg-dark: #171717;
  --auth-purple: #7b2cfe;
  --auth-purple-strong: #6d28d9;
  --auth-text-main: #111827;
  --auth-text-muted: #6b7280;
  --auth-line: #d8b4fe;
}

.auth-design-page,
.auth-design-page * ,
.auth-design-page *::before,
.auth-design-page *::after {
  box-sizing: border-box;
}

html.auth-design-html,
body.auth-design-body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body.auth-design-body {
  min-height: 100dvh;
  font-family: "Reddit Sans", "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  color: var(--auth-text-main);
  background: #f5f5f5;
  overflow: hidden;
}

.auth-design-page {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.auth-design-page .hero {
  position: absolute;
  inset: 0;
  background: var(--auth-bg-dark);
  min-height: 100dvh;
  z-index: 0;
}

.auth-design-page .hero img {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.auth-design-page .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.5));
}

.auth-design-page .content {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 1rem;
  margin-top: 0;
  position: relative;
  z-index: 2;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-design-page .card {
  width: 100%;
  max-width: 30rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.93);
  padding: 1rem 1.1rem;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.auth-design-page .title {
  margin: 0;
  font-size: clamp(1.45rem, 4.3vw, 2.25rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-weight: 900;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-design-page .title .title-login,
.auth-design-page .title .title-register {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-design-page[data-mode="login"] .title .title-register {
  display: none;
}

.auth-design-page[data-mode="register"] .title .title-login {
  display: none;
}

.auth-design-page .pill {
  width: fit-content;
  max-width: 100%;
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  color: #fff;
  background: var(--auth-purple);
}

.auth-design-page .auth-forms {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
}

.auth-design-page .mode-switch {
  margin: 0;
  border: 0;
  padding: 0.25rem;
  background: #f3f4f6;
  border-radius: 999px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  box-shadow: inset 0 0 0 1px #e5e7eb;
}

.auth-design-page .mode-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-design-page .mode-switch label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  border-radius: 999px;
  cursor: pointer;
  padding: 0.7rem 0.75rem;
  color: var(--auth-text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  transition: 0.2s ease;
  margin: 0;
}

.auth-design-page .mode-switch label svg {
  width: 1rem;
  height: 1rem;
}

.auth-design-page .mode-switch input:checked + label {
  color: #111;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), inset 0 0 0 1px #d1d5db;
}

.auth-design-page .auth-form {
  display: grid;
  gap: 0.65rem;
}

.auth-design-page[data-mode="login"] .auth-form-register {
  display: none;
}

.auth-design-page[data-mode="register"] .auth-form-login {
  display: none;
}

.auth-design-page .field label.field-label {
  display: block;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 700;
}

.auth-design-page .control {
  border: 1px solid var(--auth-line);
  border-radius: 0.8rem;
  background: #fff;
  display: flex;
  align-items: stretch;
  min-height: 2.65rem;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.auth-design-page .control:focus-within {
  border-color: var(--auth-purple-strong);
  box-shadow: 0 0 0 3px rgba(123, 44, 254, 0.18);
}

.auth-design-page .icon {
  min-width: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  border-right: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #111;
  flex-shrink: 0;
}

.auth-design-page .icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.auth-design-page input,
.auth-design-page textarea,
.auth-design-page button {
  font: inherit;
}

.auth-design-page .control input,
.auth-design-page .control textarea {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--auth-text-main);
  display: block;
}

.auth-design-page .control input {
  min-height: 2.65rem;
  padding: 0.62rem 0.78rem;
}

.auth-design-page .control input:focus,
.auth-design-page .control textarea:focus {
  outline: none;
  box-shadow: none;
}

.auth-design-page .control input::placeholder,
.auth-design-page .control textarea::placeholder {
  color: #9ca3af;
}

.auth-design-page .pwd-toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--auth-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-design-page .pwd-toggle:hover {
  color: var(--auth-purple-strong);
}

.auth-design-page .pwd-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
}

.auth-design-page .control.has-pwd-toggle input {
  padding-right: 2.2rem;
}

.auth-design-page .row-2 {
  display: grid;
  gap: 0.65rem;
}

.auth-design-page .submit-btn {
  border: 0;
  width: 100%;
  border-radius: 999px;
  background: var(--auth-purple);
  color: #fff;
  font-weight: 800;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.72rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 0.3rem;
}

.auth-design-page .submit-btn:hover {
  background: var(--auth-purple-strong);
}

.auth-design-page .submit-btn:focus-visible {
  outline: 3px solid rgba(251, 146, 60, 0.55);
  outline-offset: 2px;
}

.auth-design-page .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-design-page .meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.auth-design-page .meta-row a {
  color: var(--auth-purple-strong);
  text-decoration: none;
  font-weight: 600;
}

.auth-design-page .meta-row a:hover {
  text-decoration: underline;
}

.auth-design-page .terms-row {
  font-size: 0.78rem;
  color: var(--auth-text-muted);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.auth-design-page .terms-row input[type="checkbox"] {
  margin-top: 0.18rem;
  accent-color: var(--auth-purple);
}

.auth-design-page .terms-row a {
  color: var(--auth-purple-strong);
  font-weight: 600;
  text-decoration: none;
}

.auth-design-page .terms-row a:hover {
  text-decoration: underline;
}

.auth-design-page .social-sep {
  text-align: center;
  font-size: 0.78rem;
  color: var(--auth-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0.4rem 0 0.1rem;
}

.auth-design-page .social-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.auth-design-page .social-row a {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-design-page .social-row a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.auth-design-page .social-row img {
  width: 1.2rem;
  height: 1.2rem;
}

.auth-design-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-design-page .iti {
  width: 100%;
}

.auth-design-page .iti__country-list {
  z-index: 9999;
}

.auth-design-page .control-tel {
  padding: 0;
}

.auth-design-page .control-tel .iti {
  display: block;
  width: 100%;
}

.auth-design-page .control-tel input[type="tel"] {
  padding-left: 0.78rem;
}

.auth-design-page .control-tel .iti--show-selected-dial-code input[type="tel"] {
  padding-left: 5rem;
}

.auth-design-page .field-error {
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 0.2rem;
  display: none;
}

.auth-design-page .field-error.show {
  display: block;
}

@media (min-width: 768px) {
  .auth-design-page {
    flex-direction: row;
    position: static;
    overflow: visible;
  }

  .auth-design-page .hero,
  .auth-design-page .content {
    order: 0;
    width: 50%;
    margin: 0;
    min-height: 100dvh;
  }

  .auth-design-page .hero {
    position: relative;
    inset: auto;
    overflow: hidden;
    z-index: auto;
  }

  .auth-design-page .hero img {
    min-height: 100dvh;
    object-position: center 22%;
  }

  .auth-design-page .hero-overlay {
    display: none;
  }

  .auth-design-page .content {
    min-height: 100dvh;
    padding: 1.4rem 1.6rem;
    background: #fff;
    align-items: center;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: auto;
  }

  .auth-design-page .card {
    max-width: 32rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
    padding: 0;
  }

  .auth-design-page .row-2 {
    grid-template-columns: 1fr 1fr;
  }
}
