/* Auth pages — layout, inputs & polish */
[x-cloak] {
  display: none !important;
}

html,
body {
  height: 100%;
}

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-brand-panel {
  background:
    radial-gradient(circle at 50% 0%, rgb(255 255 255 / 0.04) 0%, transparent 42%),
    #1a1a1a;
}

.auth-brand-panel-top {
  display: flex;
  justify-content: flex-start;
}

.auth-brand-copy {
  width: 100%;
}

.auth-brand-heading {
  margin: 0;
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}

.auth-brand-lead {
  margin: 1rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgb(255 255 255 / 0.72);
}

.auth-brand-steps {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-brand-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(255 255 255 / 0.88);
}

.auth-brand-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.16);
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
}

.auth-brand-footer {
  margin: 0;
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.42);
}

.auth-brand-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 18rem;
  text-align: left;
}

.auth-brand-logo {
  display: block;
  width: min(100%, 15rem);
  height: auto;
}

.auth-brand-accent {
  display: block;
  width: 3rem;
  height: 0.1875rem;
  margin-top: 1.25rem;
  border-radius: 9999px;
  background: linear-gradient(90deg, #fb923c 0%, #f97316 100%);
  box-shadow: 0 0 18px rgb(249 115 22 / 0.45);
}

.auth-form-panel {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at top, rgb(250 250 250 / 0.95) 0%, transparent 55%),
    #f5f5f5;
  overflow-y: auto;
}

.auth-mobile-logo {
  margin-bottom: 1.25rem;
}

.auth-form-shell {
  flex-shrink: 0;
  margin-block: auto;
}

.auth-form-card {
  padding: 1.75rem 1.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow:
    0 1px 2px rgb(15 23 42 / 0.04),
    0 12px 32px rgb(15 23 42 / 0.08);
}

@media (min-width: 640px) {
  .auth-form-card {
    padding: 2rem 1.75rem;
  }
}

.auth-form-card:has(.auth-page) {
  padding: 1.625rem 1.375rem;
}

@media (min-width: 640px) {
  .auth-form-card:has(.auth-page) {
    padding: 1.75rem 1.5rem;
  }
}

.auth-page .auth-page-header {
  margin-bottom: 1.125rem;
}

.auth-page .auth-form {
  gap: 0.875rem;
}

.auth-page .auth-form-footer {
  margin-top: 1.125rem;
  padding-top: 0.875rem;
}

.auth-page .auth-demo-section {
  margin-top: 0.875rem;
  padding: 0.75rem 0.875rem;
}

.auth-page .auth-demo-title {
  margin-bottom: 0.5rem;
}

.auth-page .auth-demo-hint {
  margin-top: 0.625rem;
}

.auth-page-header {
  margin-bottom: 1.75rem;
}

.auth-page-title {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
  line-height: 1.2;
}

.auth-page-subtitle {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
}

.auth-session-status {
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 0.625rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.auth-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.01em;
}

.auth-field-error {
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: #dc2626;
}

.auth-input {
  display: block;
  width: 100%;
  padding: 0.6875rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #0f172a;
  background-color: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.625rem;
  box-shadow: 0 1px 2px 0 rgb(15 23 42 / 0.04);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.auth-input::placeholder {
  color: #94a3b8;
}

.auth-input:hover {
  border-color: #94a3b8;
}

.auth-input:focus {
  outline: none;
  border-color: #171717;
  box-shadow: 0 0 0 3px rgb(0 0 0 / 0.12);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  transition: background-color 5000s ease-in-out 0s;
}

.auth-select {
  padding-right: 2.25rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  background-size: 1.125rem;
  cursor: pointer;
}

.auth-password-wrap {
  position: relative;
}

.auth-input-password {
  padding-right: 2.75rem;
}

.auth-password-toggle {
  position: absolute;
  inset-block: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding-inline: 0.75rem;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}

.auth-password-toggle:hover {
  color: #475569;
}

.auth-password-toggle:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 2px;
  border-radius: 0.375rem;
}

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

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox {
  width: 1rem;
  height: 1rem;
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
  accent-color: #171717;
  color: #171717;
  cursor: pointer;
}

.auth-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgb(0 0 0 / 0.12);
}

.auth-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: #fff;
  background: linear-gradient(180deg, #171717 0%, #000 100%);
  border: none;
  border-radius: 0.625rem;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.12),
    0 4px 10px rgb(0 0 0 / 0.18);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.auth-btn-primary:hover {
  background: linear-gradient(180deg, #262626 0%, #171717 100%);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.12),
    0 6px 14px rgb(0 0 0 / 0.22);
}

.auth-btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgb(0 0 0 / 0.25);
}

.auth-btn-primary:active {
  transform: translateY(1px);
}

.auth-link {
  font-weight: 600;
  color: #171717;
  text-decoration: none;
  transition: color 0.15s;
}

.auth-link:hover {
  color: #000;
}

.auth-link-sm {
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-form-footer {
  margin-top: 1.75rem;
  padding: 1.125rem 1rem 0;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  background: linear-gradient(180deg, rgb(248 250 252 / 0) 0%, rgb(248 250 252 / 0.6) 100%);
  margin-inline: -0.25rem;
  border-radius: 0 0 0.75rem 0.75rem;
}

.auth-form-footer-text {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.auth-demo-section {
  margin-top: 1.5rem;
  padding: 1rem 1.125rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
}

.auth-demo-title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.auth-demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.auth-demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.8125rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1d4ed8;
  background-color: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.auth-demo-chip:hover {
  background-color: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 2px 6px rgb(37 99 235 / 0.12);
}

.auth-demo-chip:active {
  transform: scale(0.98);
}

.auth-demo-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 9999px;
}

.auth-demo-dot-blue { background: #3b82f6; }
.auth-demo-dot-green { background: #10b981; }
.auth-demo-dot-amber { background: #f59e0b; }

.auth-demo-hint {
  margin: 0.875rem 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #64748b;
}

.auth-demo-code {
  padding: 0.125rem 0.375rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.6875rem;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
}


/* Register — same viewport behavior as login */
.auth-page-register .auth-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
}

.auth-page-register .auth-form-grid-full {
  grid-column: 1 / -1;
}

@media (max-width: 479px) {
  .auth-page-register .auth-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 720px) {
  .auth-form-panel:has(.auth-page-register) .auth-mobile-logo {
    margin-bottom: 0.625rem;
  }

  .auth-form-panel {
    justify-content: flex-start;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .auth-mobile-logo {
    margin-bottom: 0.875rem;
  }

  .auth-form-card:has(.auth-page) {
    padding: 1.375rem 1.25rem;
  }

  .auth-page .auth-page-header {
    margin-bottom: 0.875rem;
  }

  .auth-page .auth-page-title {
    font-size: 1.375rem;
  }

  .auth-page .auth-form {
    gap: 0.75rem;
  }

  .auth-page-register .auth-form-grid {
    gap: 0.75rem;
  }

  .auth-page .auth-demo-section {
    margin-top: 0.75rem;
    padding: 0.625rem 0.75rem;
  }

  .auth-page .auth-demo-hint {
    display: none;
  }
}
