:root {
  color-scheme: light;
  font-family: "Segoe UI", "Noto Sans Thai", sans-serif;
  color: #23151e;
  background: #f7f3f6;
  --wine: #6d003d;
  --wine-dark: #300018;
  --pink: #e10b6d;
  --line: #e4d9e0;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 15%, rgba(225, 11, 109, .12), transparent 35%),
    linear-gradient(135deg, #faf8fa, #eee8ed);
}

.login-shell {
  width: min(1040px, calc(100% - 40px));
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  overflow: hidden;
  border: 1px solid rgba(109, 0, 61, .12);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(54, 10, 35, .16);
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(225, 11, 109, .28), transparent 52%),
    linear-gradient(160deg, var(--wine-dark), var(--wine));
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: auto -120px -150px auto;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(255,255,255,.18);
  transform: rotate(28deg);
}

.brand-mark {
  width: min(270px, 100%);
  display: flex;
  align-items: center;
  margin-bottom: 34px;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  object-position: left center;
}

.eyebrow, .step-label {
  margin: 32px 0 12px;
  color: #f6a4c9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.brand-panel .eyebrow { margin-top: 0; }

.brand-panel h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1.03;
  letter-spacing: -.04em;
}

.brand-copy {
  max-width: 380px;
  margin: 28px 0;
  color: rgba(255,255,255,.78);
  font-size: 17px;
  line-height: 1.75;
}

.security-note {
  display: inline-flex;
  margin-top: 24px;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .08em;
}

.form-panel {
  display: grid;
  align-content: center;
  padding: 64px;
}

.form-panel .step-label { margin-top: 0; color: var(--pink); }

h2 { margin: 0; font-size: 38px; letter-spacing: -.03em; }
.form-intro { margin: 12px 0 32px; color: #76666f; line-height: 1.6; }

label {
  display: block;
  margin: 20px 0 8px;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 15px;
  color: #24141d;
  background: #fff;
  font: inherit;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(225, 11, 109, .09);
}

.password-field { position: relative; }
.password-field input { padding-right: 72px; }
.text-button {
  position: absolute;
  top: 7px;
  right: 7px;
  height: 38px;
  border: 0;
  color: var(--wine);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.primary-button, .secondary-button {
  width: 100%;
  height: 52px;
  margin-top: 28px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(100deg, var(--wine), var(--pink));
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.action-link {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.action-link[hidden] { display: none !important; }

.secondary-button { color: var(--wine); background: #f4edf1; }
.primary-button:disabled { cursor: wait; opacity: .65; }

.message { min-height: 24px; margin: 16px 0 0; color: #b0003a; font-size: 14px; }
.message.success { color: #166534; }

.account-card dl { margin: 28px 0; }
.account-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.account-card dt { color: #7a6872; }
.account-card dd { margin: 0; font-weight: 800; text-align: right; }
.password-warning {
  padding: 14px 16px;
  border: 1px solid #eac76d;
  border-radius: 12px;
  color: #6f5000;
  background: #fff8dc;
  line-height: 1.55;
}

.password-rules {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #76666f;
  font-size: 13px;
  line-height: 1.65;
}

.form-note {
  margin-top: 18px;
  color: #76666f;
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 780px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel, .form-panel { padding: 38px 28px; }
  .brand-panel h1 { font-size: 40px; }
}
