/*
 * assets/css/login-pastel.css
 * Pastel login (staff + member) — matches the mockup.
 */
:root {
  --lp-ink:    #243a78;
  --lp-muted:  #7a84a6;
  --lp-violet: #7c6cf0;
  --lp-blue:   #3fb0ff;
  --lp-pink:   #fb7fc8;
}

* { box-sizing: border-box; }

body.lp-page {
  margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; position: relative; overflow-x: hidden; color: var(--lp-ink);
  font-family: 'Sarabun', 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(700px 520px at 0% 0%,    #bfe1ff, transparent 60%),
    radial-gradient(700px 560px at 100% 100%, #ffd3ec, transparent 60%),
    radial-gradient(600px 460px at 100% 0%,  #e6dcff, transparent 60%),
    linear-gradient(135deg, #cfe6ff 0%, #e0dcff 55%, #fbe3f5 100%);
  background-attachment: fixed;
}

/* ───────── ของตกแต่งพื้นหลัง ───────── */
.lp-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.lp-bg::before {                       /* หนังสือใหญ่มุมซ้ายล่าง */
  content: ''; position: absolute; left: -60px; bottom: -40px; width: 560px; height: 440px;
  background: url('../images/hero-books.svg') left bottom / contain no-repeat; opacity: .5;
  filter: blur(.5px);
}
.lp-bg::after {                        /* คลื่นสีชมพูมุมขวาล่าง */
  content: ''; position: absolute; right: -180px; bottom: -220px; width: 680px; height: 520px;
  border-radius: 50%; background: radial-gradient(circle at 40% 40%, #ffffff88, #ffc4e655 60%, transparent 70%);
}
.lp-deco { position: absolute; color: #fff; opacity: .65; text-shadow: 0 6px 18px rgba(124,108,240,.25); }
.lp-deco.star-1 { left: 22%; top: 24%; font-size: 2.6rem; color: #ffc6e3; opacity: .9; }
.lp-deco.star-2 { right: 17%; top: 20%; font-size: 2.2rem; color: #a9c4ff; opacity: .9; }
.lp-deco.star-3 { right: 20%; top: 52%; font-size: 2rem;  color: #ffc6e3; opacity: .85; }
.lp-deco.star-4 { left: 28%; bottom: 20%; font-size: 2.4rem; color: #ffc6e3; opacity: .85; }
.lp-deco.book-1 { left: 9%;  top: 11%; font-size: 4.6rem; transform: rotate(-14deg); opacity: .5; }
.lp-deco.book-2 { right: 7%; top: 22%; font-size: 7rem;   transform: rotate(10deg);  opacity: .45; }
.lp-deco.book-3 { right: 8%; bottom: 20%; font-size: 3.6rem; transform: rotate(-8deg); opacity: .4; }
.lp-deco.ring-1 { left: 16%; top: 33%; width: 38px; height: 38px; border: 3px solid #ffffffcc; border-radius: 50%; opacity: .8; }
.lp-deco.ring-2 { right: 12%; bottom: 24%; width: 44px; height: 44px; border: 3px solid #ffffffcc; border-radius: 50%; opacity: .7; }

/* ───────── การ์ด ───────── */
.lp-card {
  position: relative; z-index: 1; width: 100%; max-width: 540px;
  background: rgba(255,255,255,.96); border-radius: 2rem;
  padding: 2.4rem 2.6rem 2.2rem; text-align: center;
  box-shadow: 0 2px 6px rgba(80,70,160,.06), 0 30px 60px -20px rgba(110,90,200,.45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

.lp-logo {
  width: 112px; height: 112px; margin: 0 auto .9rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 3.2rem; color: #fff; overflow: hidden;
  background: linear-gradient(145deg, #3fb0ff 0%, #8f7cf6 55%, #fb7fc8 100%);
  box-shadow: 0 14px 28px -10px rgba(124,108,240,.7), inset 0 0 0 4px rgba(255,255,255,.35);
}
.lp-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 8px; }
.lp-title { margin: 0; font-family: 'Prompt','Sarabun',sans-serif; font-weight: 700; font-size: 1.9rem; color: #3b4a9c; }
.lp-sub   { margin: .2rem 0 1.4rem; color: var(--lp-muted); font-size: 1rem; }

/* ───────── แจ้งเตือน ───────── */
.lp-alert {
  display: flex; align-items: center; gap: .7rem; text-align: left;
  padding: .75rem 1rem; margin-bottom: 1rem; border-radius: 1rem; font-size: .95rem; font-weight: 500;
}
.lp-alert i { font-size: 1.4rem; flex: none; }
.lp-alert.error   { background: #ffe9f0; border: 1.5px solid #ffc4d6; color: #e11d5a; }
.lp-alert.success { background: #e5faf1; border: 1.5px solid #b6ecd2; color: #0f8a5f; }

/* ───────── ช่องกรอก ───────── */
.lp-field {
  position: relative; display: flex; align-items: center; margin-bottom: .9rem;
  background: #f6f7ff; border: 1.5px solid #dfe3f7; border-radius: 999px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.lp-field:focus-within { background: #fff; border-color: #a99cf7; box-shadow: 0 0 0 4px rgba(124,108,240,.15); }
.lp-field .lp-ic { padding: 0 .4rem 0 1.2rem; font-size: 1.3rem; color: var(--lp-violet); flex: none; }
.lp-field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  padding: 1rem .8rem 1rem .4rem; font: inherit; font-size: 1.02rem; color: var(--lp-ink);
}
.lp-field input::placeholder { color: #98a0c2; }
.lp-eye {
  border: 0; background: transparent; cursor: pointer; padding: 0 1.2rem 0 .4rem;
  color: #6b72a8; font-size: 1.25rem; flex: none;
}
.lp-eye:hover { color: var(--lp-violet); }
.lp-hint { margin: -.3rem 0 1rem; text-align: left; padding-left: 1.2rem; color: var(--lp-muted); font-size: .82rem; }

/* ───────── ปุ่ม ───────── */
.lp-btn {
  display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%;
  border: 0; cursor: pointer; padding: 1rem 1.2rem; margin-top: .4rem; border-radius: 999px;
  color: #fff; font: inherit; font-family: 'Prompt','Sarabun',sans-serif; font-weight: 600; font-size: 1.1rem;
  background: linear-gradient(90deg, #3fb0ff 0%, #a07cf3 55%, #fb7fc8 100%);
  box-shadow: 0 16px 28px -14px rgba(160,124,243,.9); transition: transform .12s, filter .15s;
}
.lp-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.04); }
.lp-btn:disabled { opacity: .75; cursor: wait; }

.lp-or { display: flex; align-items: center; gap: .9rem; margin: 1.3rem 0 1rem; color: var(--lp-muted); font-size: .9rem; }
.lp-or::before, .lp-or::after { content: ''; flex: 1; height: 1px; background: #e3e6f5; }

.lp-opac {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .9rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .98rem;
  background: #f6f7ff; border: 1.5px solid #dfe3f7; color: #3b4fb8; transition: background .15s, transform .12s;
}
.lp-opac i { font-size: 1.2rem; color: var(--lp-violet); }
.lp-opac:hover { background: #eef0ff; transform: translateY(-1px); color: #3b4fb8; }

/* ตารางบัญชีทดสอบ (แสดงเฉพาะโหมด debug) */
.lp-debug { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px dashed #dfe3f7; font-size: .82rem; color: var(--lp-muted); text-align: left; }
.lp-debug table { width: 100%; }
.lp-debug td { padding: .15rem .3rem; }

@media (max-width: 575.98px) {
  .lp-card { padding: 1.8rem 1.3rem 1.6rem; border-radius: 1.6rem; }
  .lp-deco.book-2, .lp-deco.book-3, .lp-deco.star-2, .lp-deco.star-3 { display: none; }
  .lp-bg::before { width: 360px; height: 280px; opacity: .35; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
