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

body {
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fff;
  color: #111827;
  min-height: 100vh;
  display: flex;
}

.split-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.left-panel {
  width: 50%;
  display: flex;
  flex-direction: column;
  padding: 2.5rem;
  min-height: 100vh;
  background: #fff;
}

.left-panel .logo-wrap {
  margin-bottom: 2.5rem;
}

.left-panel .content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 384px;
  margin: 0 auto;
  width: 100%;
}

.right-panel {
  width: 50%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #FAD0A0 0%, #CB72DD 50%, #837BF5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.right-panel .absolute {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.page-heading h1 {
  font-size: 1.875rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.page-heading p {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #374151;
}

.form-group input {
  font-size: 0.875rem;
  color: #111827;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.form-group input:focus {
  border-color: #0a1828;
  box-shadow: 0 0 0 2px rgba(10, 24, 40, 0.1);
}

.form-group input::placeholder {
  color: #9ca3af;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #0a1828;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: opacity 0.15s;
  font-family: inherit;
}

.btn-primary:hover {
  opacity: 0.9;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.divider span {
  font-size: 0.875rem;
  color: #9ca3af;
  padding: 0 0.75rem;
  background: #fff;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  background: #fff;
  border: 1px solid rgba(10, 24, 40, 0.15);
  border-radius: 0.375rem;
  cursor: pointer;
  margin-bottom: 0.75rem;
  transition: background 0.15s;
  font-family: inherit;
  text-decoration: none;
}

.btn-oauth:hover {
  background: #f9fafb;
}

.btn-oauth img, .btn-oauth svg {
  margin-right: 0.5rem;
}

.error {
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.875rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid #fecaca;
  margin-bottom: 1rem;
}

.field-error {
  display: block;
  color: #dc2626;
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  min-height: 1.125rem;
}

.footer-text {
  text-align: center;
  font-size: 1rem;
  color: #6b7280;
  margin-top: 1.25rem;
}

.footer-text a {
  color: #111827;
  font-weight: 600;
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.page-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: center;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 0.75rem;
}

.input-wrap {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  line-height: 0;
}

.toggle-password img {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.toggle-password:hover {
  opacity: 0.7;
}

.hidden {
  display: none !important;
}

.otp-inputs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.otp-digit {
  width: 3rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  color: #111827;
  background: #fff;
}

.otp-digit:focus {
  border-color: #0a1828;
  box-shadow: 0 0 0 2px rgba(10, 24, 40, 0.1);
}

.recovery-input {
  width: 100%;
  padding: 0.875rem 0.75rem;
  font-size: 0.875rem;
  color: #111827;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  text-align: center;
  letter-spacing: 0.05em;
}

.recovery-input:focus {
  border-color: #0a1828;
  box-shadow: 0 0 0 2px rgba(10, 24, 40, 0.1);
}

.link-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  margin-top: 1rem;
  font-family: inherit;
}

.link-btn:hover {
  text-decoration: underline;
  color: #374151;
}

.verify-footer-text {
  text-align: center;
  font-size: 0.875rem;
  color: #9ca3af;
  margin-top: 1rem;
}

.register-form {
  gap: 0.5rem;
}

.register-form .form-group {
  margin-bottom: 0;
}

.register-form .form-group label {
  margin-bottom: 0.375rem;
}

.register-form .btn-primary {
  margin-top: 0.25rem;
}

.progress-bars {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  margin-top: auto;
  padding-top: 1.5rem;
}

.progress-bar-segment {
  flex: 1;
  height: 4px;
  border-radius: 9999px;
  background: #e5e7eb;
  transition: background 0.5s;
}

.progress-bar-segment.active {
  background: #0a1828;
}

.handle-input-wrap {
  position: relative;
}

.handle-at {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.875rem;
  pointer-events: none;
}

.form-group .input-with-at {
  padding-left: 1.75rem;
}

.handle-status {
  min-height: 1.25rem;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

.handle-status.ok {
  color: #15803d;
}

.handle-status.err {
  color: #b91c1c;
}

.handle-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

/* display:flex above is an author rule, so it beats the UA [hidden] {
   display:none } — without this override the container's `hidden` attribute
   (set by the template when there are no suggestions, and toggled by
   choose-handle.js) has no effect and a dangling "Available:" label sits
   above the form. */
.handle-suggestions[hidden] {
  display: none !important;
}

.handle-suggestions-label {
  color: #6b7280;
}

.handle-suggestion {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  color: #111827;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.handle-suggestion:hover {
  background: #e5e7eb;
}

@media (max-width: 768px) {
  body { background: #fff; }
  .split-layout { flex-direction: column; }
  .left-panel { width: 100%; min-height: auto; padding: 1.5rem; }
  .right-panel { display: none; }
}
