:root {
  --bg: #f8f4ef;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --text: #9e7456;
  --text-strong: #9b6b46;
  --muted: #c0a18c;
  --line: #ecd8c6;
  --line-strong: #f0b394;
  --button: #ebc79d;
  --button-hover: #dfb88b;
  --shadow: 0 24px 50px rgba(179, 150, 122, 0.16);
}

body,
button,
input,
select,
textarea,
.auth-header h1,
.auth-header h2,
.auth-session-card h2 {
  font-family: "Anuphan", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Anuphan", sans-serif;
  color: var(--text-strong);
  background:
    radial-gradient(circle at 14% 18%, rgba(240, 210, 174, 0.24), transparent 22%),
    radial-gradient(circle at 83% 26%, rgba(243, 224, 196, 0.2), transparent 20%),
    radial-gradient(circle at 76% 80%, rgba(240, 210, 174, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(250, 248, 244, 0.72) 0%, rgba(246, 241, 235, 0.62) 100%);
}

img {
  width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  overflow: hidden;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 248, 240, 0.18);
  backdrop-filter: blur(3px);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 28px 22px 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.93);
  box-shadow:
    0 28px 80px rgba(172, 138, 103, 0.22),
    0 2px 0 rgba(255, 255, 255, 0.7) inset;
  backdrop-filter: blur(18px);
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-label {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-strong);
  background: rgba(245, 233, 220, 0.9);
  border: 1px solid var(--line);
  font-size: 1.35rem;
  line-height: 1;
}

.modal-close:hover {
  background: #f2e1d0;
}

.auth-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #efd1ab 0%, #e8c191 100%);
  box-shadow: 0 12px 24px rgba(220, 178, 127, 0.26);
  overflow: hidden;
}

.auth-badge img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.auth-header {
  text-align: center;
  margin-bottom: 18px;
}

.auth-header h1 {
  font-family: "Mitr", sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.45rem);
  color: var(--text-strong);
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--muted);
  font-size: 0.95rem;
}

.form-message {
  min-height: 20px;
  margin-bottom: 10px;
  text-align: left;
  color: #cf6c51;
  font-size: 0.82rem;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-hidden {
  display: none;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.84rem;
  color: var(--muted);
}

.field input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.92);
  color: var(--text-strong);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(240, 179, 148, 0.16);
}

.field-password {
  margin-bottom: 2px;
}

.auth-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.google-btn,
.submit-btn {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
  transition: 0.2s ease;
}

.google-btn {
  border: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.98);
  color: var(--text-strong);
  cursor: pointer;
}

.google-btn:hover {
  background: #fff8f1;
}

.google-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  font-size: 0.8rem;
}

.remember-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.remember-me input {
  width: 14px;
  height: 14px;
}

.text-link {
  color: var(--muted);
}

.submit-btn {
  margin-top: 4px;
  border: 0;
  background: var(--button);
  color: #9a714f;
  cursor: pointer;
}

.submit-btn:hover {
  background: var(--button-hover);
}

.submit-btn-secondary {
  background: #f7ede0;
}

.auth-footer {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--text-strong);
  font-weight: 500;
  cursor: pointer;
}

.auth-session {
  margin-top: 18px;
}

.auth-session-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.96);
  border: 1px solid var(--line);
  text-align: center;
}

.session-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-session-card h2 {
  margin-bottom: 6px;
  font-family: "Mitr", sans-serif;
  font-weight: 400;
  font-size: 1.65rem;
}

.auth-session-card p:not(.session-label) {
  margin-bottom: 14px;
  color: var(--muted);
}

@media (max-width: 520px) {
  .auth-card {
    padding: 24px 18px 22px;
  }

  .auth-header h1 {
    font-size: 1.85rem;
  }

  .form-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-footer {
    flex-direction: column;
    align-items: center;
  }
}

body,
button,
input,
select,
textarea,
p,
span,
a,
label,
small,
li {
  font-family: "Kanit", sans-serif !important;
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Kanit", sans-serif !important;
  font-weight: 600 !important;
}

/* Reduce auth page font weight by one level. */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500 !important;
}

strong,
b {
  font-weight: 600;
}

.google-btn,
.submit-btn,
.text-button {
  font-weight: 400;
}
