@font-face {
  font-family: "Attendance Thai";
  src: url("../fonts/noto-thai-Regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Attendance Thai";
  src: url("../fonts/noto-thai-Bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #fcf8f9;
  --paper: #fff;
  --ink: #301e28;
  --muted: #6d5862;
  --berry: #a63153;
  --line: #eee0e5;
  --rose-wash: #fae9ee;
  --body-font: "Attendance Thai", "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 20px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 15px/1.65 var(--body-font); }
a { color: inherit; text-decoration: none; }
button, select { color: inherit; font: inherit; }
button, select, a[href] { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #ad3f61; outline-offset: 4px; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand { display: flex; align-items: center; gap: 11px; align-self: flex-start; margin: 0 0 40px 6px; border-radius: 12px; white-space: nowrap; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; line-height: 1.35; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 3px; }
.hero-art { position: absolute; z-index: 0; top: 50%; right: 4.5%; width: 306px; height: 232px; transform: translateY(-50%); pointer-events: none; }
.art-halo { position: absolute; inset: 5px 32px 5px 30px; border-radius: 50%; background: #fff0f571; }
.art-dots { position: absolute; inset: 12px 18px 8px 34px; background: radial-gradient(#a24b693b 1px, transparent 1.6px) 0 0 / 14px 14px; mask-image: radial-gradient(ellipse at center, transparent 27%, #000 49%, transparent 77%); }
.art-star { position: absolute; width: 21px; height: 21px; background: #fff7fa; clip-path: polygon(50% 0, 63% 36%, 100% 50%, 63% 62%, 50% 100%, 37% 62%, 0 50%, 37% 37%); }
.art-star-one { top: 30px; right: 36px; }
.art-star-two { bottom: 37px; left: 34px; width: 14px; height: 14px; background: #c7557b; }
.art-orbit { position: absolute; border-radius: 50%; border: 1px solid #fff5f9; }
.art-orbit-one { width: 10px; height: 10px; top: 54px; left: 44px; }
.art-orbit-two { width: 15px; height: 15px; bottom: 33px; right: 24px; background: #da7b97; border-color: #ebacc0; }
.board {
  position: absolute;
  left: 89px;
  top: 28px;
  width: 139px;
  height: 179px;
  padding: 14px 10px 10px;
  border-radius: 15px;
  border: 1px solid #de82a0;
  background: linear-gradient(145deg, #f8adc4, #e67e9d 80%);
  box-shadow: 0 6px 0 #d16a8a, 8px 19px 26px #9f35534a, inset 0 2px 2px #ffe7ecb0;
  transform: rotate(-12deg);
}
.sheet { height: 100%; padding: 27px 12px 10px; border: 1px solid #fffafd; border-radius: 8px; background: linear-gradient(160deg, #fff, #fff3f6 96%); box-shadow: 0 2px 4px #b757753c; }
.sheet-heading { width: 58px; height: 7px; margin-bottom: 14px; border-radius: 6px; background: #e5a1b7; }
.sheet-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sheet-row i { position: relative; width: 16px; height: 16px; border-radius: 4px; background: #f6d9e3; }
.sheet-row i::after { position: absolute; content: ""; left: 5px; top: 3px; width: 5px; height: 8px; border: solid #ad4669; border-width: 0 2px 2px 0; transform: rotate(44deg); }
.sheet-row:last-child i { background: transparent; border: 1px solid #eac0d0; }
.sheet-row:last-child i::after { content: none; }
.sheet-row b { height: 5px; width: 45px; border-radius: 6px; background: #efd2dc; }
.sheet-row:nth-child(3) b { width: 35px; }
.sheet-row:last-child b { width: 49px; }
.clip { position: absolute; width: 53px; height: 19px; top: 4px; left: 42px; border: 1px solid #d17593; border-radius: 6px; background: linear-gradient(175deg, #ed96b1, #cd5d81); box-shadow: 0 2px 3px #a13b5852, inset 0 1px 1px #fdd0df; }
.clip::before { position: absolute; content: ""; width: 21px; height: 12px; top: -8px; left: 15px; border: 2px solid #df83a1; border-radius: 8px 8px 3px 3px; background: #e991ad; }
.clip::after { position: absolute; content: ""; width: 5px; height: 5px; top: -4px; left: 23px; border-radius: 50%; background: #f5ccdb; }
.pencil { position: absolute; z-index: 2; top: 108px; right: 57px; width: 14px; height: 89px; border-radius: 5px 5px 2px 2px; transform: rotate(33deg); background: linear-gradient(90deg, #b94b70, #e888a6 29%, #e888a6 58%, #d7668a 60%); box-shadow: 4px 3px 8px #99375639; }
.pencil i { position: absolute; inset: 10px 0 auto; height: 7px; background: linear-gradient(90deg, #f1c7d6, #fff2f6 50%, #e8aec2); }
.pencil::after { content: ""; position: absolute; width: 14px; height: 17px; top: 100%; background: linear-gradient(#f4c1a9 68%, #a14161 68%); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.login-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(16px, 4vw, 52px);
  background:
    radial-gradient(ellipse at 84% 4%, #f9e1e9 0%, transparent 37%),
    radial-gradient(ellipse at 10% 92%, #f8e6ed 0%, transparent 41%),
    var(--canvas);
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(305px, 1fr) minmax(305px, 1.04fr);
  width: min(1030px, 100%);
  min-height: 540px;
  border: 1px solid #f0dbe3;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 22px 70px #55203913, 0 4px 13px #50213108;
}

.login-content {
  align-self: center;
  padding: 48px clamp(34px, 5.2vw, 74px);
}

.login-brand {
  margin: 0 0 40px;
}

.login-brand img {
  flex: none;
  border-radius: 14px;
  box-shadow: 0 4px 9px #ae36552e;
}

.login-intro h1 {
  margin: 0 0 8px;
  color: #482332;
  font-size: clamp(39px, 4.5vw, 55px);
  line-height: 1.22;
  letter-spacing: -.055em;
}

.login-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.login-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 55px;
  gap: 11px;
  margin-top: 28px;
  border: 1px solid #a63153;
  border-radius: 11px;
  padding: 10px 15px;
  color: var(--paper);
  background: linear-gradient(120deg, #ad3559, #a63153);
  box-shadow: 0 5px 12px #a6315326;
  font-weight: 700;
  transition: background-color .15s, box-shadow .15s;
}

.login-form { margin-top: 26px; }
.login-field label { display: block; margin-bottom: 7px; font-weight: 700; }
.login-field label span { color: var(--muted); font-size: 13px; font-weight: 400; }
.login-field input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.login-field input::placeholder { color: var(--muted); }
.login-field input[aria-invalid="true"] { border-color: #a63153; }
.login-password { position: relative; }
.login-password input { padding-right: 116px; }
.login-password-toggle {
  position: absolute;
  top: 3px;
  right: 3px;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  color: var(--berry);
  background: transparent;
  font-size: 12px;
}
.login-password-toggle:hover { background: var(--rose-wash); }
.login-field-error { min-height: 23px; margin: 3px 0 7px; color: #a63153; font-size: 12px; }
.login-form .login-action { width: 100%; margin-top: 8px; text-align: left; }
.login-status { min-height: 44px; margin: 10px 0 0; color: #a63153; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .login-action { transition: none; }
}

.login-action:hover {
  background: #8f2848;
  box-shadow: 0 6px 15px #a6315338;
}

.login-arrow {
  width: 17px;
  height: 17px;
}

.login-access {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.login-access .icon {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  color: var(--berry);
}

.login-illustration {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  margin: 10px;
  border: 1px solid #f1d0de;
  border-radius: 17px;
  background:
    radial-gradient(ellipse at 64% 94%, #efb4ca 0, transparent 64%),
    linear-gradient(145deg, #fff1f5 6%, #fbe1eb 51%, #f5cadb 100%);
}

.login-illustration::before,
.login-illustration::after {
  position: absolute;
  z-index: -1;
  width: 88%;
  aspect-ratio: 1;
  border: 1px solid #fff7fbc9;
  border-radius: 50%;
  content: "";
}

.login-illustration::after {
  width: 105%;
  border-color: #fff7fb76;
}

.login-artwork {
  position: relative;
  width: 306px;
  height: 232px;
}

.login-artwork .hero-art {
  inset: 0 auto auto 0;
  transform: scale(1.48);
  transform-origin: center;
}

.login-artwork .art-halo {
  background: #fff5f999;
}

@media (max-width: 940px) {
  .login-artwork .hero-art { transform: scale(1.19); }
}

@media (max-width: 710px) {
  .login-layout {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 470px);
    min-height: 0;
    border-radius: 18px;
  }

  .login-content { padding: 30px clamp(20px, 7vw, 42px) 25px; }
  .login-brand { margin-bottom: 27px; }
  .login-intro h1 { font-size: clamp(34px, 8.5vw, 44px); }
  .login-action { margin-top: 22px; }
  .login-illustration { display: none; }
}


html { scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #c78a9e var(--canvas); }
* { scrollbar-width: thin; scrollbar-color: #c78a9e var(--canvas); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--canvas); }
::-webkit-scrollbar-thumb { background: #c78a9e; border: 2px solid var(--canvas); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--berry); }
.login-choice { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.login-choice input { flex: none; width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--berry); }
.login-action:disabled { opacity: .65; cursor: wait; }
.login-status[data-tone="success"] { color: #286047; }
.login-field select { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 11px 13px; }
.login-field .select2-container { width: 100% !important; }
.login-field .select2-selection--single { height: 50px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.login-field .select2-selection--single .select2-selection__rendered { padding: 11px 34px 11px 13px; line-height: 26px; color: var(--ink); }
.login-field .select2-selection--single .select2-selection__arrow { height: 48px; right: 9px; }
.login-field .select2-container--disabled .select2-selection--single { background: var(--canvas); opacity: .7; cursor: not-allowed; }
.select2-dropdown { border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--paper); }
.select2-search--dropdown .select2-search__field { min-height: 40px; border: 1px solid var(--line); border-radius: 7px; padding: 6px; font: inherit; }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--berry); color: var(--paper); }
.select2-results__option { overflow-wrap: anywhere; }
.select2-container--default .select2-results > .select2-results__options { max-height: 220px; }
@media (forced-colors: active) { * { scrollbar-color: auto; } }
