:root {
  color-scheme: light;
  font-family: 'Noto Sans Thai', 'Segoe UI', sans-serif;
  color: #344d70;
  background: #dff4ff;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: #dff4ff url('../images/login-classroom-government.png') center center / cover no-repeat fixed;
}
button, input { font: inherit; }
a { color: #2174dc; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #246fd4; outline-offset: 5px; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 3.8%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: #214778;
  font-size: 17px;
  font-weight: 700;
  border: 1px solid #ffffffb3;
  border-radius: 18px;
  padding: 10px 18px;
  background: #ffffffdc;
  box-shadow: 0 4px 20px #4b8fc00c;
}
.brand-icon { font-size: 24px; }
.header-note { font-size: 13px; color: #244d70; background: #ffffffb8; padding: 8px 15px; border-radius: 30px; }
.login-layout {
  min-height: calc(100svh - 153px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 22px 8.5% 40px;
  position: relative;
}
.welcome {
  position: absolute;
  top: 0;
  left: 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 29px 20px;
  border: 3px solid #fff;
  border-radius: 45% 45% 40% 40%;
  background: #fff9f4ed;
  box-shadow: 0 8px 25px #a35a8514;
  transform: rotate(-7deg);
  color: #e65a91;
  font-size: clamp(25px, 2.6vw, 42px);
  font-weight: 800;
}
.welcome small { font-size: 13px; color: #5581b5; font-weight: 500; }
.welcome-heart { font-size: 21px; padding-left: 8px; color: #ff8db6; }
.welcome-flower { position: absolute; left: -13px; top: -12px; font-size: 41px; color: #ff95bc; text-shadow: 0 2px white; }
.login-card {
  width: min(100%, 490px);
  padding: 32px 39px 0;
  border: 2px solid #ffffffed;
  border-radius: 34px;
  background: linear-gradient(150deg, #fffffffa 50%, #eff9ffed);
  box-shadow: 0 22px 65px #296ca52b, 0 4px 12px #5b9dd112;
  backdrop-filter: blur(12px);
}
.card-heading { text-align: center; margin-bottom: 26px; }
.eyebrow { color: #5d87ab; font-size: 13px; margin: 0 0 4px; }
h1 { margin: 0; font-size: 31px; font-weight: 800; letter-spacing: -.7px; color: #163e78; }
.intro { font-size: 14px; color: #72849d; margin: 8px 0 0; }
.login-form { margin-bottom: 26px; }
.field { margin-bottom: 20px; }
.field label { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; margin-bottom: 9px; }
.field label span { font-size: 20px; line-height: 1; }
.field input {
  width: 100%;
  min-height: 53px;
  border: 1px solid #dce6f3;
  border-radius: 13px;
  background: #eef4fd;
  padding: 13px 16px;
  color: #29466a;
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: #899bb4; opacity: 1; }
.field input:focus { outline: none; border-color: #69b9f9; box-shadow: 0 0 0 4px #66bfff22; }
.password-field { position: relative; }
.password-field input { padding-right: 53px; }
.password-toggle { position: absolute; right: 6px; top: 5px; border: none; background: transparent; color: #7b92b0; width: 43px; height: 43px; cursor: pointer; border-radius: 9px; }
.password-toggle[hidden] { display: none; }
.password-toggle:hover { color: #2174dc; background: #dfeeff; }
.password-toggle svg { width: 22px; height: 22px; vertical-align: middle; }
.eye-slash { display: none; }
.password-toggle[aria-pressed='true'] .eye-slash { display: block; }
.login-button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 55px; padding: 13px 20px; margin-top: 8px; border: 0; border-radius: 30px; background: linear-gradient(105deg, #31c4ee, #3d78ff); box-shadow: 0 9px 21px #389def42, inset 0 1px 1px #ffffff70; color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.login-button:hover { transform: translateY(-2px); box-shadow: 0 12px 26px #389def60; }
.login-button:active { transform: translateY(0); }
.button-arrow { font-size: 23px; margin-left: 8px; font-weight: 400; }
.register-link { text-align: center; margin: 24px 0 27px; font-size: 14px; color: #73849c; }
.register-link a { font-weight: 700; text-underline-offset: 4px; margin-left: 4px; }
.register-link a:hover { color: #164da5; }
.card-footer { border-top: 1px solid #e4edf5; text-align: center; padding: 17px 0; font-size: 11px; color: #8296ad; }
.card-footer span { color: #e788ab; font-size: 17px; vertical-align: middle; margin-right: 4px; }
.page-footer { padding: 0 20px 20px; text-align: center; color: #395d7e; font-size: 12px; text-shadow: 0 1px 5px #fff; }
.page-footer span { color: #c4823b; margin-left: 7px; }
.error-message { padding: 12px 15px; margin-bottom: 20px; color: #a53656; background: #fff0f4; border: 1px solid #f7cddd; border-radius: 12px; font-size: 14px; }
@media (min-width: 1700px) { .login-card { width: 530px; padding: 40px 45px 0; } .card-heading { margin-bottom: 32px; } .field { margin-bottom: 25px; } }
@media (max-width: 1100px) { .login-layout { padding-right: 5%; } .login-card { width: 440px; padding: 28px 30px 0; } .welcome { left: 4%; font-size: 28px; } }
@media (max-width: 760px) {
  body { background-position: 28% top; background-size: auto 430px; background-attachment: scroll; }
  .site-header { justify-content: center; padding: 18px 16px; }
  .brand { font-size: 14px; padding: 8px 15px; border-radius: 15px; }
  .header-note, .welcome { display: none; }
  .login-layout { justify-content: center; min-height: calc(100svh - 133px); padding: 180px 18px 28px; background: linear-gradient(180deg, transparent, #dff1ff80 38%, #e6f4ffcf); }
  .login-card { width: 440px; padding: 26px 26px 0; border-radius: 28px; }
  h1 { font-size: 28px; }
  .page-footer { background: #e6f4ffcf; font-size: 11px; }
}
@media (max-height: 600px) and (min-width: 761px) {
  .site-header { padding-block: 14px; }
  .login-layout { min-height: auto; padding-block: 12px 28px; }
  .login-card { padding-top: 22px; }
}
@media (max-width: 380px) { .login-card { padding-inline: 20px; } .login-layout { padding-inline: 12px; } .register-link { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
