*, *::before, *::after { box-sizing: border-box; }

:root {
  --page: #f7faff;
  --surface: #ffffff;
  --surface-blue: #eef2ff;
  --ink: #2a3049;
  --body: #3f465c;
  --secondary: #62687a;
  --muted: #858b99;
  --border: #e1e5ed;
  --border-strong: #cdd4e1;
  --primary: #4364e8;
  --primary-hover: #3654cf;
  --fail: #b42318;
  --shadow: 0 1px 2px rgba(42, 48, 73, .04), 0 12px 28px rgba(42, 48, 73, .05);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--body);
  font: 15px/1.55 Manrope, "Noto Sans Thai", "Noto Sans", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(67, 100, 232, .22);
  outline-offset: 2px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px;
}

.auth-shell {
  width: min(100%, 1000px);
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(440px, 1.1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-panel {
  display: flex;
  flex-direction: column;
  padding: 38px 42px;
  border-right: 1px solid #dce3f4;
  background: var(--surface-blue);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 31px; height: 31px; }
.brand__name { color: var(--ink); font-size: 18px; font-weight: 800; }
.product-copy { max-width: 360px; margin: auto 0; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.product-copy h1 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.18;
}

.product-copy p:not(.eyebrow) { margin: 0; color: var(--secondary); line-height: 1.7; }
.product-panel__note { margin: 0; color: var(--muted); font-size: 12px; }
.sign-in-panel { display: grid; align-content: center; justify-items: center; padding: 56px 64px 36px; }
.sign-in-card { width: min(100%, 390px); }
.sign-in-card__heading { margin-bottom: 30px; }
.sign-in-card__heading h2 { margin: 0 0 8px; color: var(--ink); font-size: 27px; font-weight: 750; }
.sign-in-card__heading > p:last-child { margin: 0; color: var(--secondary); font-size: 14px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 650; }

.field input {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--ink);
  outline: none;
}

.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67, 100, 232, .09); }
.sign-in-button {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 1px solid var(--primary);
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.sign-in-button:hover { background: var(--primary-hover); }
.sign-in-button:disabled { cursor: wait; opacity: .65; }
.form-message { min-height: 21px; margin: 10px 0 0; color: var(--fail); font-size: 13px; text-align: center; }
.security-note { align-self: end; margin: 54px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.page-loading { width: min(100% - 48px, 1000px); margin: 48px auto; color: var(--secondary); }

@media (max-width: 780px) {
  .auth-page { padding: 24px; }
  .auth-shell { min-height: 0; grid-template-columns: 1fr; }
  .product-panel { display: none; }
  .sign-in-panel { min-height: 520px; padding: 48px 32px 28px; }
}
