/* ==========================================================================
   HAMU SHOP — หน้า Login / Register (ใช้คู่กับ style.css)
   ========================================================================== */

body.auth {
  background:
    radial-gradient(760px 460px at 22% 18%, rgba(16, 185, 129, .07), transparent 65%),
    var(--bg);
}

/* กริดหลัก ----------------------------------------------------------------- */
.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  flex: 1 1 auto;
}

/* การ์ดซ้าย ---------------------------------------------------------------- */
.auth-side {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  display: flex;
  flex-direction: column;
}
.auth-side .art {
  border-radius: 14px;
  overflow: hidden;
  background: #0a0c0e;
}
.auth-side .art img { width: 100%; display: block; }
.auth-side h2 {
  margin: 26px 0 0;
  font-size: 30px;
  font-weight: 800;
  text-align: center;
  line-height: 1.25;
}
.auth-side h2 .green { display: block; }
.auth-side .sub {
  margin: 10px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--text-2);
}

.feature-list { margin-top: 26px; }
.feature-item { display: flex; gap: 16px; padding: 11px 0; }
.feature-item .fi {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  flex: 0 0 auto;
  background: rgba(16, 185, 129, .09);
  border: 1px solid rgba(16, 185, 129, .26);
  color: var(--g1);
}
.feature-item b { display: block; font-size: 15px; font-weight: 700; color: var(--g1); margin-bottom: 4px; }
.feature-item p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.75; }

.art-bottom { margin-top: auto; padding-top: 24px; }
.art-bottom img { width: 100%; border-radius: 14px; display: block; }

.dots-ind { display: flex; gap: 8px; justify-content: center; margin-top: auto; padding-top: 26px; }
.dots-ind i { width: 28px; height: 4px; border-radius: 4px; background: var(--line-2); }
.dots-ind i.on { background: var(--g2); }

/* การ์ดขวา (ฟอร์ม) --------------------------------------------------------- */
.auth-main {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px 44px 44px;
}
.auth-main h1 { margin: 0; font-size: 34px; font-weight: 800; }
.auth-main .sub { margin: 10px 0 0; font-size: 15px; color: var(--text-2); }

.form-label { display: block; font-size: 14px; font-weight: 600; margin: 24px 0 9px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .lead { position: absolute; left: 17px; color: var(--muted); pointer-events: none; }
.input-wrap input {
  width: 100%;
  height: 56px;
  padding: 0 46px;
  border-radius: 11px;
  background: var(--input);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 14.5px;
  outline: none;
}
.input-wrap input::placeholder { color: var(--muted); }
.input-wrap input:focus { border-color: rgba(16, 185, 129, .5); }
.input-wrap .trail {
  position: absolute; right: 14px;
  background: none; border: 0; padding: 4px;
  color: var(--muted);
  line-height: 0;
}
.input-wrap .trail:hover { color: var(--text-2); }
/* .hint ย้ายไปอยู่ใน style.css แล้ว เพราะใช้ทั้งหน้าบ้านและหลังบ้าน */

.form-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-cols .form-label { margin-top: 0; }

.form-row { display: flex; align-items: center; margin: 24px 0 26px; }
.form-row .check { font-size: 14px; color: var(--text); }
.form-row .link { margin-left: auto; font-size: 14px; color: var(--g1); }
.form-row .link:hover { text-decoration: underline; }

.btn-auth {
  width: 100%;
  height: 58px;
  border-radius: 12px;
  font-size: 17px;
  justify-content: center;
  gap: 12px;
}
.btn-auth .ico { margin-left: auto; }

.signup-box {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(18, 21, 25, .5);
  text-align: center;
}
.signup-box b { font-size: 19px; font-weight: 700; }
.signup-box p { margin: 7px 0 18px; font-size: 13.5px; color: var(--text-2); }
.signup-box .btn { width: 100%; max-width: 320px; height: 50px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 9px; flex: 0 0 auto; width: 84px; }
.step .n {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  font-size: 14px; font-weight: 700;
  color: var(--muted);
}
.step span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.step.active .n { background: var(--g2); border-color: transparent; color: #04150e; }
.step.active span { color: var(--g1); font-weight: 600; }

.agree {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 24px 0 26px;
  font-size: 13.5px; color: var(--text);
  line-height: 1.6;
  cursor: pointer;
}
.agree a { color: var(--g1); }
.agree a:hover { text-decoration: underline; }

/* กล่องติกยอมรับ — ใช้หน้าตาเดียวกับ .check ใน style.css แต่ชิดบรรทัดแรกของข้อความ */
.agree input { display: none; }
.agree .box {
  width: 18px; height: 18px;
  margin-top: 2px;
  border-radius: 5px;
  border: 1.5px solid var(--line-2);
  background: var(--input);
  display: grid; place-items: center;
  flex: 0 0 auto;
  transition: background .15s, border-color .15s;
}
.agree .box svg { width: 12px; height: 12px; stroke: #04150e; stroke-width: 3.2; opacity: 0; }
.agree input:checked + .box { background: var(--g2); border-color: var(--g2); }
.agree input:checked + .box svg { opacity: 1; }
.agree input:focus-visible + .box { border-color: var(--g1); box-shadow: 0 0 0 3px rgba(16, 185, 129, .25); }

.have-account { text-align: center; margin: 24px 0 0; font-size: 14px; color: var(--text-2); }
.have-account a { color: var(--g1); font-weight: 600; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 940px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-side { order: 2; }
  .auth-main { padding: 30px 24px 34px; }
  .auth-main h1 { font-size: 28px; }
  .auth-foot .links { margin-left: 0; width: 100%; gap: 20px; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .form-cols { grid-template-columns: 1fr; }
  .auth-main { padding: 24px 16px 28px; }
  .auth-main h1 { font-size: 25px; }
  .auth-main .sub { font-size: 14px; }
  .auth-side { padding: 18px; }
  .auth-side h2 { font-size: 24px; margin-top: 20px; }
  .auth-side .sub { font-size: 14px; }
  .feature-item { gap: 13px; }
  .input-wrap input { height: 52px; }
  .btn-auth { height: 52px; font-size: 16px; }
  .signup-box { padding: 18px; }
  .signup-box b { font-size: 17px; }
  .form-label { margin-top: 20px; }
  .form-row { margin: 20px 0 22px; }
}

@media (max-width: 380px) {
  .step { width: 66px; }
  .step span { font-size: 11px; }
  .auth-main { padding: 20px 14px 24px; }
}
