@charset "UTF-8";
   /*1. ตัวแปรสีและฟอนต์หลัก (Variables)*/
:root {
  --navy: #152b49;
  --deep: #10213a;
  --ink: #24364d;
  --muted: #68778a;
  --gold: #b78d43;
  --gold-light: #e4c987;
  --green: #14614d;
  --line: #e2e7ed;
  --danger: #a14f4a;
  --font: "Noto Sans Thai", "Leelawadee UI", Tahoma, Arial, sans-serif;
}
   2. การตั้งค่าพื้นฐาน (Reset & Base)
* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: linear-gradient(135deg, #f7f8fa 0%, #f3f1ea 100%);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 9px 14px;
  transform: translateY(-150%);
  border: 2px solid var(--gold);
  background: #fff;
  color: var(--navy);
}

.skip-link:focus {
  transform: translateY(0);
}

/*3. ส่วนหัวและเมนูนำทาง (Header & Navigation) */

.auth-header {
  color: #fff;
  background: var(--deep);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 6px 20px #10213a1c;
}

.auth-header-inner {
  width: min(1160px, calc(100% - 40px));
  min-height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.auth-mark {
  display: flex;
  flex: 0 0 42px;
  width: 42px;
  height: 50px;
  align-items: center;
  justify-content: center;
  padding: 2px;
  overflow: hidden;
  border: 1px solid var(--gold-light);
  border-radius: 50%;
  background: #fff;
}

.auth-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-brand-copy strong,
.auth-brand-copy small {
  display: block;
  white-space: nowrap;
}

.auth-brand-copy strong {
  font-size: 17px;
  line-height: 1.3;
}

.auth-brand-copy small {
  margin-top: 2px;
  color: #b8c5d1;
  font-size: 15px;
}

.auth-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  font-weight: 700;
}

.auth-nav a {
  color: #dde5ee;
  text-decoration: none;
  white-space: nowrap;
}

.auth-nav a:hover {
  color: var(--gold-light);
}

.auth-nav .nav-cta,
.auth-nav .nav-apply-button {
  padding: 8px 14px;
  border: 1px solid var(--gold-light);
  border-radius: 4px;
  color: var(--gold-light);
}

/* 4. กล่องเข้าสู่ระบบหลัก (Login Card & Headings) */
.login-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.login-shell {
  width: min(100%, 480px);
}

.login-card {
  padding: 36px 34px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 45px #152b4914;
}

.kicker {
  margin: 0;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.login-card h1 {
  margin: 8px 0;
  color: var(--navy);
  font-size: 30px;
  line-height: 1.25;
}

.auth-lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
}

/* 5. กล่องแจ้งเตือน (Alerts) */
.form-error,
.form-success {
  margin: 0 0 18px;
  padding: 11px 13px;
  border-left: 3px solid;
  border-radius: 4px;
  font-size: 13.5px;
  line-height: 1.55;
}

.form-error {
  border-color: var(--danger);
  color: #87463f;
  background: #fbf1f0;
}

.form-success {
  border-color: var(--green);
  color: var(--green);
  background: #eef7f2;
}

/* 6. ฟอร์ม ช่องกรอกข้อมูล และปุ่ม (Forms & Buttons)*/
.field {
  position: relative;
  display: block;
  margin: 0 0 14px;
}

.field-label,
.field span {
  display: block;
  margin-bottom: 5px;
  color: #46576c;
  font-size: 13px;
  font-weight: 700;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
/*ช่องกรอกข้อความ*/
.field input,
.input-wrap input {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 40px !important;
  padding: 8px 12px !important;
  border: 1px solid #d5dfe7;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap input {
  padding-right: 62px !important;
}

.field input:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #b78d4320;
}

/* ปุ่ม "แสดง"*/
.password-toggle,
.input-wrap button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 4px 10px;
  border: 1px solid #e2e7ed;
  border-radius: 4px;
  background: #f7f9fb;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  z-index: 2;
}

.password-toggle:hover,
.input-wrap button:hover {
  background: #eef7f2;
  border-color: var(--green);
}
/* ปุ่มเข้าสู่ระบบ */
.auth-actions {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.auth-actions a {
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.auth-actions a:hover {
  text-decoration: underline;
}

.button,
.auth-actions button,
.login-card button[type="submit"] {
  display: inline-flex;
  min-width: 180px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 24px;
  border: 0;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px #152b4926;
  transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.button:hover,
.auth-actions button:hover,
.login-card button[type="submit"]:hover {
  background: var(--deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px #152b4938;
}

.button:active,
.auth-actions button:active,
.login-card button[type="submit"]:active {
  transform: translateY(0);
}

/* 7. ลืมรหัสผ่าน / ตั้งรหัสผ่านใหม่ (Forgot & Reset Password) */
.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.field-head .field-label {
  margin-bottom: 0;
}

.forgot-link {
  color: var(--green);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.forgot-link:hover {
  color: var(--navy);
  text-decoration: underline;
}

.auth-account-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 10px 14px;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  background: #f3f7fc;
  color: #46576c;
  font-size: 13.5px;
}

.auth-account-pill strong {
  color: var(--navy);
}

.reset-dev-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #e7d4a8;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.55;
}

.reset-dev-box strong {
  color: var(--navy);
  font-size: 14px;
}

.reset-dev-box p {
  margin: 0;
  color: #5b6778;
}

.reset-dev-box .button {
  align-self: flex-start;
  margin-top: 4px;
}

/* Unified Site Builder Theme for Auth Header & Footer */
.auth-header {
  background: linear-gradient(135deg, var(--sb-header-start, var(--sb-primary, #14614d)) 0%, var(--sb-header-end, #10213a) 100%);
  border-bottom: 3px solid var(--sb-accent, #c89a48);
}

.auth-footer {
  padding: 18px 24px;
  color: #dbe5f0;
  text-align: center;
  background: linear-gradient(135deg, var(--sb-footer-start, var(--sb-primary, #14614d)) 0%, var(--sb-footer-end, #10213a) 100%);
  border-top: 2px solid var(--sb-accent, #c89a48);
  font-size: 13px;
}
