/* Shared sign-in and account creation design. */
.auth-page .auth-form .otp-input { text-align: center; font-size: 28px; line-height: 1.2; letter-spacing: .45em; padding-inline-start: calc(var(--ui-space-4) + .45em); min-height: 64px; }
.otp-status, .otp-expiry, .otp-resend, .otp-restart { font-size: var(--ui-text-label); line-height: 1.8; }
.otp-status { color: #315f8c; margin-bottom: 24px; }
.otp-expiry { color: var(--ui-text-secondary); text-align: center; margin-top: 16px; }
.otp-resend { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; white-space: nowrap; }
.otp-countdown { color: var(--ui-text-secondary); font-variant-numeric: tabular-nums; }
.otp-countdown[hidden] { display: none; }
.otp-digits { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(1px, calc(10vw - 32px), 10px); }
.auth-page .auth-form .otp-digit { width: 100%; min-width: 0; min-height: 64px; padding: 12px 0; text-align: center; font-size: 26px; line-height: 1.2; }
.auth-page .auth-form .otp-canonical { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.otp-text-button { border: 0; background: transparent; padding: 8px 4px; color: var(--navy); min-height: var(--ui-target-min-size); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.otp-text-button:disabled { color: var(--ui-text-secondary); cursor: not-allowed; text-decoration: none; }
.otp-restart { text-align: center; margin-top: 16px; }
.auth-page {
  grid-template-columns: 1.04fr 1fr;
}
.auth-page .auth-form-side {
  padding: var(--ui-space-12) clamp(32px, 5.6vw, 96px) var(--ui-space-8);
}
.auth-page .auth-form-wrap {
  max-width: 400px;
  padding: var(--ui-space-12) 0 var(--ui-space-16);
}
.auth-page .auth-form-wrap h2 {
  font-size: var(--ui-title-large);
  line-height: 1.6;
  margin-bottom: var(--ui-space-2);
}
.auth-page .auth-form-wrap > .eyebrow {
  font-size: var(--ui-text-label);
  margin-bottom: var(--ui-space-3);
  color: #377874;
}
.auth-page .auth-form-wrap > .muted {
  font-size: var(--ui-text-label);
  color: var(--ui-text-secondary);
  line-height: 1.9;
  margin-bottom: var(--ui-space-8);
}
.auth-page .auth-form {
  gap: var(--ui-space-6);
}
.auth-page .auth-field {
  display: grid;
  gap: var(--ui-space-2);
}
.auth-page .auth-form label {
  font-size: var(--ui-text-label);
  line-height: 1.7;
  margin: 0;
}
.auth-page .auth-form input {
  font-size: var(--ui-text-body);
  line-height: 1.5;
  min-height: var(--ui-control-min-height);
  border-color: var(--ui-control-border);
  border-radius: var(--ui-control-radius);
  padding: var(--ui-space-3) var(--ui-space-4);
}
.auth-page .auth-form input::placeholder {
  color: var(--ui-text-secondary);
  opacity: 1;
  font-weight: 400;
}
.auth-page .auth-form input:focus {
  border-color: var(--ui-focus);
  outline: 3px solid var(--ui-focus);
  outline-offset: -3px;
  box-shadow: none;
}
.auth-page .auth-form input[aria-invalid="true"] {
  border-color: var(--ui-error);
  outline: 2px solid var(--ui-error);
  outline-offset: -2px;
  box-shadow: none;
}
.auth-page .auth-form input[aria-invalid="true"]:focus {
  outline-width: 3px;
  outline-offset: -3px;
}
.auth-page .auth-field .field-error {
  color: var(--ui-error);
  font-size: var(--ui-text-label);
  line-height: 1.8;
  margin: 0;
  overflow-wrap: anywhere;
}
.auth-page .auth-field .field-hint {
  font-size: var(--ui-text-label);
  line-height: 1.8;
  margin: 0;
  color: var(--ui-text-secondary);
}
.auth-page :is(button, a):focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}
.auth-page .auth-form button {
  font-size: var(--ui-text-body);
  font-weight: 500;
  line-height: 1.5;
  min-height: var(--ui-control-min-height);
  padding: var(--ui-space-3) var(--ui-space-6);
  margin: 0;
  border-radius: var(--ui-control-radius);
}
.auth-page .auth-form :is(.form-error, .errorlist) {
  font-size: var(--ui-text-label);
  line-height: 1.8;
  padding: var(--ui-space-3) var(--ui-space-4);
  margin: 0;
}
.auth-page .auth-switch {
  font-size: var(--ui-text-label);
  color: var(--ui-text-secondary);
  margin-top: var(--ui-space-6);
}
.auth-page .auth-switch a {
  display: inline-flex;
  align-items: center;
  min-height: var(--ui-target-min-size);
}
.auth-page .auth-footer {
  justify-content: center;
  font-size: var(--ui-text-small);
  color: var(--ui-text-secondary);
}
.auth-page .auth-art {
  padding: clamp(40px, 5.3vw, 80px);
  background: radial-gradient(ellipse at 10% 100%, #257b80 0, transparent 65%),
    linear-gradient(145deg, #182d48, #1b4f5e);
}
.auth-page .art-copy {
  width: 100%;
  max-width: 470px;
  margin-inline: auto;
}
.auth-page .art-copy > a.overline {
  display: inline-flex;
  align-items: center;
  font-size: var(--ui-text-label);
  min-height: var(--ui-target-min-size);
  padding-block: var(--ui-space-2);
  text-underline-offset: 5px;
}
.auth-page .art-copy > a.overline:hover {
  text-decoration: underline;
}
.auth-page .art-copy h1 {
  font-size: clamp(40px, 4.2vw, 56px);
  line-height: 1.65;
  margin: var(--ui-space-6) 0;
}
.auth-page .art-copy p {
  font-size: var(--ui-text-body);
  line-height: 2;
  margin-bottom: 0;
  color: #d3e4e5;
}
.auth-page .art-rule {
  width: var(--ui-space-12);
  background: #afa67a;
  margin: var(--ui-space-8) 0 var(--ui-space-6);
}
.auth-page .art-features {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  font-size: var(--ui-text-small);
  gap: var(--ui-space-4);
  color: #d3e4e5;
}
.auth-page .art-features li + li {
  display: flex;
  align-items: center;
  gap: var(--ui-space-4);
}
.auth-page .art-features li + li::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #afa67a;
}
.auth-page .art-pattern {
  width: 500px;
  height: 516px;
  left: -250px;
  top: auto;
  bottom: -150px;
  border: 0;
  border-radius: 0;
  background: url('identity/manarat-ornament.svg') center / contain no-repeat;
  filter: brightness(0) invert(1);
  opacity: .18;
  transform: none;
  pointer-events: none;
}
.auth-page .art-pattern::before, .auth-page .art-pattern::after {
  content: none;
}
@media (max-width: 1000px) and (min-width: 761px) {
  .auth-page .auth-form-side { padding-inline: var(--ui-space-8); }
  .auth-page .auth-art { padding-inline: var(--ui-space-8); }
  .auth-page .auth-form-wrap h2 { font-size: var(--ui-title-small); }
}
@media (max-width: 760px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-page .auth-form-side { padding: var(--ui-space-8) var(--ui-space-6) var(--ui-space-6); }
  .auth-brand { align-self: center; gap: var(--ui-space-3); }
  .auth-brand img { width: 48px; height: 43px; }
  .auth-brand-wordmark { font-size: 30px; }
  .auth-page .auth-form-wrap { padding: var(--ui-space-10) 0 var(--ui-space-12); }
  .auth-page .auth-form-wrap h2 { font-size: var(--ui-title-small); }
}

.auth-recovery-link { margin: 12px 0 0; text-align: center; }
.auth-recovery-link a { display: inline-flex; align-items: center; min-height: 44px; }

/* Quiet, shared state language: ink/teal, a single status marker, no shaking. */
.auth-feedback, .auth-notice, .auth-page .otp-status {
  border: 1px solid #cadcda;
  border-inline-start: 3px solid #377874;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 24px;
  font-size: var(--ui-text-label);
  line-height: 1.9;
  color: #245b56;
  background: #f2f8f6;
  overflow-wrap: anywhere;
}
.auth-feedback[hidden], .auth-feedback [hidden] { display: none; }
.auth-feedback p { margin: 0; }
.auth-feedback a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.auth-feedback[data-state="loading"] { background: #f4f6fa; border-color: #d6deea; border-inline-start-color: #315f8c; color: #304868; }
.auth-feedback[data-state="failure"], .auth-page .otp-status[data-state="failure"] { background: #fff6f4; border-color: #eed0c9; border-inline-start-color: var(--ui-error); color: #963223; }
.auth-feedback[data-state="success"] p::before { content: '✓'; margin-inline-end: 8px; font-weight: 600; }
.auth-page button:disabled { cursor: not-allowed; }
.auth-page button[data-loading] { display: flex; justify-content: center; align-items: center; gap: 10px; opacity: 1; cursor: wait; }
.auth-page button[data-loading]::before { content: ''; width: 16px; height: 16px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; flex-shrink: 0; animation: auth-spin .8s linear infinite; }
.auth-page input, .auth-page button { transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@keyframes auth-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes auth-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .auth-page *, .auth-page *::before { animation: none !important; transition: none !important; }
}

.deletion-policy{border:1px solid #efd6d2;background:#fff9f7;border-radius:12px;padding:18px;margin:22px 0;color:#674d49}.deletion-policy h3{font-size:15px;margin:0 0 8px}.deletion-policy p{font-size:13px;line-height:1.9;margin:0 0 12px}.deletion-policy p:last-child{margin:0}.auth-notice[data-state=failure]{background:#fff2ef;color:#b42318}

.auth-page .button.danger{background:#a32920}.auth-page .button.danger:hover{background:#842219}
