@font-face {
  font-family: "Noto Sans Thai";
  src: url("/static/fonts/NotoSansThai-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Thai";
  src: url("/static/fonts/NotoSansThai-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Noto Sans Thai", sans-serif;
  color: #172033;
  background: #f4f8fc;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f4f8fc;
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
}

.registration-card {
  width: 100%;
  max-width: 520px;
  padding: 32px;
  border: 1px solid #d7e4f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 70, 110, .08);
}

.page-header {
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e3ebf3;
}

h1 {
  margin: 0 0 6px;
  color: #155b94;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.35;
}

.page-header p {
  margin: 0;
  color: #637387;
  font-size: 14px;
}

.field {
  margin-bottom: 17px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #26384b;
  font-size: 14px;
  font-weight: 600;
}

small {
  display: block;
  margin-top: 5px;
  color: #78889a;
  font-size: 12px;
}

input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid #bdccda;
  border-radius: 6px;
  outline: none;
  color: #172033;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

input::placeholder {
  color: #9ba8b5;
}

input:focus {
  border-color: #2879ba;
  box-shadow: 0 0 0 3px rgba(40, 121, 186, .12);
}

input[aria-invalid="true"] {
  border-color: #c43b3b;
  box-shadow: 0 0 0 3px rgba(196, 59, 59, .10);
}

.field-error {
  margin-top: 6px;
  color: #b42323;
  font-size: 12px;
  font-weight: 600;
}

.field-error:empty {
  display: none;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 68px;
}

.reveal {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  padding: 6px 9px;
  border: 0;
  color: #1f6fae;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.submit {
  width: 100%;
  min-height: 48px;
  margin-top: 3px;
  border: 1px solid #17639f;
  border-radius: 6px;
  color: #fff;
  background: #2477b8;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

.submit:hover {
  background: #1d6ca9;
}

.submit:focus-visible {
  outline: 3px solid rgba(40, 121, 186, .22);
  outline-offset: 2px;
}

.submit:disabled {
  cursor: wait;
  opacity: .65;
}

.message {
  min-height: 0;
  margin: 0;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.55;
}

.message:not(:empty) {
  margin: 2px 0 14px;
  padding: 10px 12px;
}

.message.success {
  border: 1px solid #a8d6bb;
  color: #1e6b3b;
  background: #f1fbf5;
}

.message.error {
  border: 1px solid #e4b8b8;
  color: #a02e2e;
  background: #fff5f5;
}

.note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid #e3ebf3;
  color: #728195;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 560px) {
  .page-shell {
    padding: 0;
  }

  .registration-card {
    min-height: 100vh;
    padding: 28px 20px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  h1 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
