/* =========================================================
   auth.css — ສະໄຕລ໌ໜ້າ "ລົງຊື່ເຂົ້າໃຊ້ / ສະໝັກສະມາຊິກ"
   ໃຊ້ຮ່ວມກັນລະຫວ່າງ login.html ແລະ signup.html
   ໂຕນສີ/ຕົວແປອ້າງອີງຈາກ style.css ຂອງໜ້າຫຼັກ ເພື່ອໃຫ້ກົງກັນ
   ອັບເດດ: ເອົາເອຟເຟັກ 3D ທັງໝົດອອກ (tilt/perspective/preserve-3d/
   translateZ/glossy sheen) — ໃຊ້ flat design ລ້ວນໆ, ໂຕນສີແດງ #FF0001
   ========================================================= */

:root{
  --bg:#000000;
  --bg-raise:#0a0a0a;
  --card:#0a0a0a;
  --card-border:#1e1e1e;
  --red:#ff0001;
  --red-deep:#990001;
  --red-glow:#ff0001;
  --gold:#e8b34a;
  --text:#ffffff;
  --text-dim:#999999;
  --text-faint:#777777;
  --radius:16px;
  --discord:#5865f2;
}

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

body{
  background:var(--bg);
  color:var(--text);
  font-family:'Noto Sans Lao','Rajdhani',sans-serif;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
  overflow-x:hidden;
}
.en{ font-family:'Rajdhani','Noto Sans Lao',sans-serif; }
.display-lo{ font-family:'Noto Sans Lao Looped','Noto Sans Lao',sans-serif; }
a{ color:inherit; text-decoration:none; }
button, input{ font-family:inherit; }

/* ---------- Shell ---------- */
.auth-shell{
  position:relative;
  max-width:480px;
  margin:0 auto;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:32px 22px 40px;
  overflow:hidden;
}

/* ---------- Back to home ---------- */
.auth-back{
  position:relative; z-index:2;
  align-self:flex-start;
  display:inline-flex; align-items:center; gap:6px;
  color:var(--text-faint);
  font-size:13px; font-weight:600;
  margin-bottom:22px;
  transition:color .15s ease;
}
.auth-back svg{ width:15px; height:15px; }
.auth-back:hover{ color:var(--text-dim); }

/* ---------- Brand crest (flat, no tilt) ---------- */
.auth-crest{
  position:relative; z-index:2;
  width:76px; height:76px;
  margin:0 auto 14px;
}
.auth-crest-inner{
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  border-radius:22px;
  background:none;
  box-shadow:none;
  position:relative;
  overflow:hidden;
}
.auth-crest svg{ width:36px; height:36px; position:relative; z-index:1; }
.auth-crest-inner img{ width:100%; height:100%; object-fit:contain; position:relative; z-index:1; }

.auth-brand{
  position:relative; z-index:2;
  text-align:center;
  font-size:16px; font-weight:800;
  letter-spacing:.3px;
  margin-bottom:4px;
}
.auth-brand .accent{ color:var(--red-glow); }
.auth-tagline{
  position:relative; z-index:2;
  text-align:center;
  color:var(--text-faint);
  font-size:12.5px;
  margin-bottom:26px;
}

/* ---------- Card (flat, no tilt) ---------- */
.auth-card-wrap{ position:relative; z-index:2; width:100%; }
.auth-card{
  background:var(--card);
  border:1px solid var(--card-border);
  border-radius:20px;
  padding:26px 22px 24px;
  width:100%;
  box-shadow:none;
  position:relative;
  overflow:hidden;
}
.auth-card-title{
  font-size:21px; font-weight:800;
  margin-bottom:6px;
}
.auth-card-sub{
  color:var(--text-dim); font-size:13px; line-height:1.6;
  margin-bottom:22px;
}

/* ---------- Form fields ---------- */
.field{ margin-bottom:14px; }
.field label{
  display:block; font-size:12.5px; font-weight:700;
  color:var(--text-dim); margin-bottom:7px;
}
.field-input{
  display:flex; align-items:center; gap:10px;
  background:var(--bg-raise);
  border:1.5px solid var(--card-border);
  border-radius:12px;
  padding:12px 14px;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.field-input:focus-within{
  border-color:var(--red);
  box-shadow:0 0 0 3px rgba(255,0,1,.15);
}
.field-input svg{ width:17px; height:17px; color:var(--text-faint); flex-shrink:0; }
.field-input input{
  flex:1; min-width:0;
  background:transparent; border:none; outline:none;
  color:var(--text); font-size:14.5px;
}
.field-input input::placeholder{ color:var(--text-faint); }
.field-toggle{
  background:none; border:none; color:var(--text-faint);
  cursor:pointer; display:flex; padding:2px;
}
.field-toggle svg{ width:17px; height:17px; }
.field-error{
  color:var(--red-glow); font-size:12px; margin-top:6px;
  display:none;
}
.field.has-error .field-input{ border-color:var(--red-glow); }
.field.has-error .field-error{ display:block; }

.field-row{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.check-row{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--text-dim); }
.check-row input{ width:15px; height:15px; accent-color:var(--red); }
.link-muted{ font-size:12.5px; color:var(--text-faint); font-weight:600; }
.link-muted:hover{ color:var(--red-glow); }

/* ---------- Buttons (flat, no gloss/gradient) ---------- */
.btn-block{
  width:100%; display:flex; align-items:center; justify-content:center; gap:8px;
  padding:14px; border-radius:12px; border:none;
  font-size:15px; font-weight:800; letter-spacing:.2px;
  cursor:pointer;
  transition:transform .12s ease, filter .12s ease;
}
.btn-block:active{ transform:scale(.97); }
.btn-block:disabled{ opacity:.65; cursor:not-allowed; }
.btn-submit{
  background:var(--red);
  color:#fff;
  box-shadow:none;
  margin-bottom:18px;
}
.btn-submit:hover:not(:disabled){ filter:brightness(1.06); }

.divider{
  display:flex; align-items:center; gap:12px;
  color:var(--text-faint); font-size:12px;
  margin-bottom:18px;
}
.divider::before, .divider::after{
  content:""; flex:1; height:1px; background:var(--card-border);
}

.btn-discord{
  background:var(--discord);
  color:#fff;
  box-shadow:none;
}
.btn-discord:hover:not(:disabled){ filter:brightness(1.08); }
.btn-discord svg{ width:19px; height:19px; }

.btn-google{
  background:#fff;
  color:#3c4043;
  box-shadow:none;
  border:1px solid var(--card-border);
  margin-top:10px;
}
.btn-google:hover:not(:disabled){ filter:brightness(.97); }
.btn-google svg{ width:19px; height:19px; }

.auth-switch{
  text-align:center; margin-top:22px;
  font-size:13px; color:var(--text-dim);
  position:relative; z-index:2;
}
.auth-switch a{ color:var(--red-glow); font-weight:700; }
.auth-switch a:hover{ text-decoration:underline; }

.auth-terms{
  text-align:center; margin-top:16px;
  font-size:11.5px; color:var(--text-faint); line-height:1.6;
  position:relative; z-index:2;
}
.auth-terms a{ color:var(--text-dim); text-decoration:underline; }

.toast{
  position:fixed; left:50%; bottom:26px; transform:translate(-50%, 20px);
  background:var(--card); border:1px solid var(--card-border);
  color:var(--text); font-size:13px; font-weight:600;
  padding:12px 18px; border-radius:12px;
  box-shadow:none;
  display:flex; align-items:center; gap:8px;
  opacity:0; pointer-events:none;
  transition:opacity .25s ease, transform .25s ease;
  z-index:50; max-width:88vw;
}
.toast.show{ opacity:1; transform:translate(-50%, 0); }
.toast.error{ border-color:rgba(255,0,1,.5); }
.toast svg{ width:16px; height:16px; color:var(--gold); flex-shrink:0; }
.toast.error svg{ color:var(--red-glow); }


/* กันเว็บซูมเอง: iOS ซูมหน้าตอนแตะช่องกรอกที่ตัวอักษร < 16px */
html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; touch-action:manipulation; }
input, select, textarea{ font-size:16px !important; }
