/* ═══════════════════════════════════════════════════════════════
   หน้าเข้าสู่ระบบ (/auth/login · .lg-*) และสมัครสมาชิก (/auth/register · .rg-*)
   แบบที่เลือก: public/mockup/login.html (แบบ A) · public/mockup/register.html — 2026-09-14
   ต้องโหลดหลัง onzon.css · ใช้โทเคนสีจากธีมทั้งหมด → โหมดมืดเปลี่ยนตามเอง

   ⚠️ หน้า 2FA / เปลี่ยนรหัส / สมัครสำเร็จ ยังใช้ .panel/.field/.btn-primary ใน onzon.css
      อย่าแก้คลาสพวกนั้นเพื่อสองหน้านี้
   ═══════════════════════════════════════════════════════════════ */

/* ───────── ของใช้ร่วม: หัวข้อ · กล่องข้อความ · ช่องกรอก · ปุ่ม ───────── */
.au-h1 {
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.au-sub {
  margin-top: 6px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.au-sub b {
  color: var(--warn);
}
.au-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.au-alert svg {
  flex: 0 0 auto;
  margin-top: 2px;
}
.au-alert.is-error {
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  color: var(--warn);
}
.au-alert.is-info {
  background: var(--accent-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
}
.au-alert[hidden] {
  display: none;
}

.au-field label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin-bottom: 7px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}
.au-field label em {
  margin-left: -6px;
  font-style: normal;
  color: var(--warn);
}
.au-field label small {
  margin-left: auto;   /* คำอธิบายเล็ก (ไม่บังคับ · ตัวนับ) ชิดขวา */
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ink-faint);
}
.au-field input,
.au-field select,
.au-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--bg);
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.au-field textarea {
  min-height: 76px;
  line-height: 1.6;
  resize: vertical;
}
.au-field input::placeholder,
.au-field textarea::placeholder {
  color: var(--ink-faint);
}
.au-field input:focus,
.au-field select:focus,
.au-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 4px var(--accent-wash);
}
/* ช่องมีไอคอนนำหน้า (หน้า login) */
.au-input {
  position: relative;
}
.au-input > svg {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
}
.au-input:focus-within > svg {
  color: var(--accent);
}
.au-input.has-ico input {
  padding-left: 44px;
}
.au-input.has-eye input {
  padding-right: 46px;
}
.au-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
}
.au-eye:hover,
.au-eye.is-on {
  background: var(--accent-wash);
  color: var(--accent);
}
.au-hint {
  margin-top: 7px;
  font-size: 0.76rem;
  color: var(--ink-faint);
}
/* ลิงก์ในข้อความช่วย (เช่น "ลืมรหัสผ่าน?") — ไม่ขีดเส้นใต้ สีเดียวกับข้อความรอบ ๆ */
.au-hint a {
  color: inherit;
  text-decoration: none;
}
.au-hint a:hover {
  color: var(--accent);
}

.au-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}
.au-btn.is-main {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}
.au-btn.is-main:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.au-btn.is-ghost {
  background: transparent;
  border-color: var(--hair);
  color: var(--ink);
}
.au-btn.is-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent);
}
.au-btn.is-block {
  width: 100%;
}

/* แผงรูปเคลือบฟิล์มเขียว (login ซ้าย · register ซ้าย)
   ลำดับชั้น: รูป (0) → ฟิล์ม (1) → ข้อความ (2)
   ⚠️ ต้องมี z-index — ไม่งั้นรูปทับฟิล์ม ข้อความขาวจมหายในรูปสว่าง
   ⚠️ ตัวอักษรสีตายตัว — ฟิล์มเข้มทั้งสองโหมด */
.au-visual {
  position: relative;
  overflow: hidden;
  color: #fdfbf6;
}
.au-visual > img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.au-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(165deg, rgba(24, 44, 14, 0.92) 0%, rgba(47, 95, 25, 0.8) 52%, rgba(47, 95, 25, 0.5) 100%);
}
.au-visual > :not(img) {
  position: relative;
  z-index: 2;
}
.au-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.au-brand-ic {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: #fdfbf6;
}
.au-brand-ic img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.au-brand b {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.au-visual h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  font-weight: 700;
  line-height: 1.3;
}
.au-visual h2 + p {
  margin-top: 10px;
  font-size: 0.93rem;
  line-height: 1.7;
  color: rgba(253, 251, 246, 0.88);
}
.au-visual a {
  color: #fdfbf6;
}

/* ───────── หน้า login ───────── */
.lg-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  width: min(1080px, 94vw);
  margin: clamp(24px, 5vh, 56px) auto clamp(40px, 8vh, 84px);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}
.lg-visual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 600px;
  padding: 36px;
}
.lg-visual > img {
  object-position: 72% center;
}
.lg-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}
.lg-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}
.lg-points i {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(253, 251, 246, 0.28);
  border-radius: 10px;
  background: rgba(253, 251, 246, 0.16);
}
.lg-pilot {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(253, 251, 246, 0.3);
  border-radius: 999px;
  background: rgba(253, 251, 246, 0.14);
  font-size: 0.78rem;
}
.lg-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 54px);
}
.lg-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 22px;
}
.lg-form .au-btn {
  margin-top: 4px;
}
.lg-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.lg-or::before,
.lg-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hair);
}
.lg-note {
  margin-top: 8px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.lg-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.lg-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lg-foot svg {
  color: var(--accent);
}
.lg-foot a {
  color: var(--ink-soft);
  text-decoration: none;
}
.lg-foot a:hover {
  color: var(--accent);
}

@media (max-width: 900px) {
  .lg-wrap {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }
  .lg-visual {
    gap: 14px;
    min-height: 0;
    padding: 26px 22px;
  }
  .lg-points,
  .lg-pilot {
    display: none;
  }
  .lg-visual h2 {
    font-size: 1.35rem;
  }
}

/* ───────── หน้าสมัครสมาชิก ───────── */
.rg-wrap {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  width: min(1180px, 94vw);
  margin: clamp(20px, 4vh, 48px) auto clamp(40px, 8vh, 84px);
}
.rg-aside {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 640px;
  padding: 32px 30px;
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}
.rg-aside > img {
  object-position: 60% center;
}
.rg-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rg-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding-bottom: 16px;
}
.rg-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 36px;
  bottom: 2px;
  left: 16px;
  width: 2px;
  background: rgba(253, 251, 246, 0.25);
}
.rg-steps i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(253, 251, 246, 0.35);
  border-radius: 50%;
  background: rgba(253, 251, 246, 0.14);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 700;
}
.rg-steps li:first-child i {
  border-color: #fdfbf6;
  background: #fdfbf6;
  color: #2f5f19;
}
.rg-steps b {
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
}
.rg-steps small {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(253, 251, 246, 0.8);
}
.rg-aside-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(253, 251, 246, 0.22);
  font-size: 0.85rem;
}
.rg-aside-foot a {
  font-weight: 600;
}
.rg-aside-foot .rg-back {
  font-weight: 400;
  color: rgba(253, 251, 246, 0.8);
  text-decoration: none;
}

.rg-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rg-card {
  padding: 24px 26px;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
.rg-card-h {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.rg-card-h .n {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-wash);
  font-weight: 700;
  color: var(--accent);
}
.rg-card-h h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.rg-card-h small {
  display: block;
  margin-top: 1px;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-faint);
}
.rg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}
.rg-grid .is-full {
  grid-column: 1 / -1;
}
.rg-sub {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--hair);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.rg-grid > .rg-sub:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* รหัสผ่าน: เงื่อนไข + ตรงกันไหม */
.rg-match {
  margin-top: 6px;
  font-size: 0.78rem;
}
.rg-match.is-ok {
  color: var(--accent);
}
.rg-match.is-no {
  color: var(--warn);
}
.rg-reqs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: -2px;
}
.rg-reqs span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  font-size: 0.74rem;
  color: var(--ink-faint);
  transition: all 0.2s;
}
.rg-reqs span::before {
  content: "○";
  font-size: 0.7rem;
}
.rg-reqs span.is-ok {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-wash);
  color: var(--accent);
}
.rg-reqs span.is-ok::before {
  content: "✓";
}

/* รูปโปรไฟล์ */
.rg-av-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.rg-av-prev {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
}
.rg-av-prev img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rg-av-up {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--bg);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.rg-av-up:hover {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent);
}
.rg-avs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 10px;
}
.rg-av {
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.rg-av:hover {
  transform: scale(1.08);
}
.rg-av.is-sel {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.rg-av img {
  display: block;
  width: 100%;
  height: 100%;
}

/* สวิตช์ลงทะเบียนร้าน */
.rg-switch {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}
.rg-switch .ic {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-wash);
  color: var(--accent);
}
.rg-switch .tx {
  flex: 1;
}
.rg-switch .tx b {
  display: block;
  font-size: 1rem;
  color: var(--ink);
}
.rg-switch .tx small {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.rg-sw {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 28px;
}
.rg-sw input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.rg-sw span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--hair);
  transition: background 0.2s;
}
.rg-sw span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}
.rg-sw input:checked + span {
  background: var(--accent);
}
.rg-sw input:checked + span::after {
  transform: translateX(22px);
}
.rg-sw input:focus-visible + span {
  box-shadow: 0 0 0 4px var(--accent-wash);
}
.rg-shop {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
}
.rg-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rg-day {
  padding: 7px 14px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--bg);
  font: inherit;
  font-size: 0.82rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.rg-day.is-off {
  border-color: color-mix(in srgb, var(--warn) 40%, transparent);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  color: var(--warn);
  text-decoration: line-through;
}

.rg-submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}
.rg-submit p {
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.rg-submit p a {
  font-weight: 600;
  color: var(--accent);
}
.rg-submit .au-alert {
  flex: 1 1 100%;
  margin-top: 0;
}

@media (max-width: 980px) {
  .rg-wrap {
    grid-template-columns: 1fr;
  }
  .rg-aside {
    position: relative;
    top: 0;
    gap: 14px;
    min-height: 0;
    padding: 24px 22px;
  }
  .rg-aside h2 {
    font-size: 1.35rem;
  }
  .rg-steps {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .rg-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background: rgba(253, 251, 246, 0.12);
  }
  .rg-steps li::after {
    display: none;
  }
  .rg-steps i {
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
  }
  .rg-steps b {
    margin: 0;
    font-size: 0.82rem;
  }
  .rg-steps small,
  .rg-aside-foot {
    display: none;
  }
}
@media (max-width: 620px) {
  .rg-grid {
    grid-template-columns: 1fr;
  }
  .rg-grid .rg-spacer {
    display: none;
  }
  .rg-card {
    padding: 20px 18px;
  }
  .rg-submit .au-btn {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════
   หน้าหลังเข้าสู่ระบบ: กรอกรหัส 2FA · ตั้ง 2FA · เปลี่ยนรหัสผ่าน · สมัครสำเร็จ (.as-*)
   แบบที่เลือก: public/mockup/auth-steps.html — ทั้ง 4 หน้าไม่มีหัวเว็บ (Auth ตั้ง showHeader=false)
   ═══════════════════════════════════════════════════════════════ */
.as-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 16px 60px;
  background: radial-gradient(1100px 520px at 50% -10%, var(--accent-wash), transparent 70%), var(--bg);
}
.as-card {
  width: min(460px, 100%);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}
.as-card.is-md {
  width: min(640px, 100%);
}
.as-card.is-wide {
  width: min(940px, 100%);
}

/* หัวการ์ด = แถบรูปเคลือบเขียว (.au-visual) */
.as-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 26px 30px;
}
.as-head > img {
  object-position: center 40%;
}
.as-head-ic {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(253, 251, 246, 0.35);
  border-radius: 16px;
  background: rgba(253, 251, 246, 0.16);
}
.as-head h1 {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
}
.as-head p {
  margin-top: 4px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(253, 251, 246, 0.88);
}
.as-head p b {
  color: #fdfbf6;
}
.as-req {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(253, 251, 246, 0.95);
  font-size: 0.74rem;
  font-weight: 700;
  color: #2f5f19;
}
.as-body {
  padding: 26px 30px 28px;
}
.as-body > .au-alert:first-child {
  margin-top: 0;
  margin-bottom: 18px;
}
.as-alert-row {
  margin: 18px 30px 0;
}
.as-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.as-foot a {
  color: var(--ink-soft);
  text-decoration: none;
}
.as-foot a:hover {
  color: var(--accent);
}
.as-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.as-foot svg {
  color: var(--accent);
}

/* ช่องรหัส 6 หลัก — input ช่องเดียวจริง (มือถือเติมรหัสอัตโนมัติได้ · one-time-code) แสดงผลเป็น 6 กล่อง */
.as-otp {
  position: relative;
  max-width: 420px;
  margin-top: 6px;
}
.as-otp input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  font-size: 16px;   /* กัน iOS ซูมตอนแตะ */
}
.as-otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  pointer-events: none;
}
.as-otp-boxes span {
  display: grid;
  place-items: center;
  height: 64px;
  border: 1.5px solid var(--hair);
  border-radius: 14px;
  background: var(--bg);
  font-size: 1.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.as-otp.is-focus .as-otp-boxes span.is-cur {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}
.as-otp-boxes span.is-cur:empty::after {
  content: "";
  width: 2px;
  height: 1.4rem;
  background: var(--accent);
  animation: asBlink 1s steps(2) infinite;
}
@keyframes asBlink {
  50% {
    opacity: 0;
  }
}
.as-otp.is-error .as-otp-boxes span {
  border-color: color-mix(in srgb, var(--warn) 55%, transparent);
}
.as-otp-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  max-width: 420px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.as-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.as-ring {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p, 1) * 360deg), var(--hair) 0);
}

/* ตั้ง 2FA — QR ซ้าย · ขั้นตอนขวา */
.as-setup {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}
.as-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 24px;
  text-align: center;
  background: var(--accent-wash);
  border-right: 1px solid var(--hair);
}
.as-qr-cap {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
}
.as-qr-box {
  padding: 12px;
  border: 1px solid var(--hair);
  border-radius: 18px;
  background: #fff;   /* QR ต้องพื้นขาวทั้งสองโหมด ไม่งั้นแอปสแกนไม่ติด */
  box-shadow: var(--shadow-sm);
}
.as-qr-box img,
.as-qr-box canvas {
  display: block;
  width: 188px !important;
  height: 188px !important;
}
.as-or {
  font-size: 0.76rem;
  color: var(--ink-faint);
}
.as-secret {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 12px;
  background: var(--panel);
}
.as-secret code {
  font-family: ui-monospace, monospace;
  font-size: 0.86rem;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.as-copy {
  padding: 7px 10px;
  border: 1px solid var(--hair);
  border-radius: 9px;
  background: var(--bg);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.as-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.as-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}
.as-steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.as-steps li > i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  font-size: 0.85rem;
  font-style: normal;
  font-weight: 700;
  color: var(--accent-ink);
}
.as-steps b {
  color: var(--ink);
}
.as-steps small {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.as-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.as-apps span {
  padding: 3px 10px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  font-size: 0.74rem;
  color: var(--ink-soft);
}

/* เปลี่ยนรหัสผ่าน */
.as-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.as-grid .rg-reqs {
  margin-top: 0;
}
.as-pw-row {
  display: flex;
  gap: 8px;
}
.as-pw-row .au-input {
  flex: 1;
}
.as-gen {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--bg);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.as-gen:hover {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent);
}
.as-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.as-meter-bar {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.as-meter-bar i {
  height: 6px;
  border-radius: 999px;
  background: var(--hair);
  transition: background 0.2s;
}
.as-meter small {
  min-width: 88px;
  text-align: right;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-faint);
}

/* สมัครสำเร็จ */
.as-done {
  padding: 34px 30px 30px;
  text-align: center;
}
.as-check {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 6%, transparent);
}
.as-done h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
}
.as-done > p {
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.as-track {
  list-style: none;
  margin: 24px 0 6px;
  text-align: left;
}
.as-track li {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding-bottom: 18px;
}
.as-track li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 36px;
  bottom: 2px;
  left: 16px;
  width: 2px;
  background: var(--hair);
}
.as-track li.is-done::after {
  background: var(--accent);
}
.as-track li > i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--hair);
  border-radius: 50%;
  background: var(--panel);
  font-size: 0.85rem;
  font-style: normal;
  font-weight: 700;
  color: var(--ink-faint);
}
.as-track li.is-done > i {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.as-track li.is-now > i {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-wash);
}
.as-track b {
  display: block;
  margin-top: 5px;
  font-size: 0.95rem;
  color: var(--ink);
}
.as-track small {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-faint);
}
.as-now {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-wash);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  vertical-align: 2px;
}
.as-done-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

@media (max-width: 760px) {
  .as-setup {
    grid-template-columns: 1fr;
  }
  .as-qr {
    border-right: 0;
    border-bottom: 1px solid var(--hair);
  }
  .as-head {
    padding: 22px 20px;
  }
  .as-body {
    padding: 22px 20px 24px;
  }
  .as-alert-row {
    margin: 16px 20px 0;
  }
  .as-otp-boxes {
    gap: 7px;
  }
  .as-otp-boxes span {
    height: 56px;
    border-radius: 12px;
    font-size: 1.4rem;
  }
}
