:root {
  --orange:       #ee4d2d;
  --orange-light: #fff2f0;
  --orange-mid:   #ffd5cc;
  --bg:           #f5f5f5;
  --white:        #fff;
  --border:       #e8e8e8;
  --text:         #222;
  --text-2:       #555;
  --text-3:       #999;
  --radius:       4px;
}

html { font-size: 14px; }
body { font-family: 'Sarabun', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* ── PAGE WRAP ── */
.reg-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 48px;
}

/* ── CARD ── */
.reg-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
  overflow: hidden;
}

/* ── CARD HEADER BAR ── */
.reg-topbar {
  background: var(--orange);
  padding: 20px 28px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.reg-topbar .icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  flex-shrink: 0;
}
.reg-topbar-text { color: #fff; }
.reg-topbar-text h1 {
  font-family: 'Kanit', sans-serif;
  font-size: 18px; font-weight: 600;
  line-height: 1.2; margin: 0;
}
.reg-topbar-text p {
  font-size: 12px; opacity: .8; margin: 2px 0 0;
}

/* ── FORM BODY ── */
.reg-body {
  padding: 28px 28px 32px;
}

/* ── FORM FIELDS ── */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 12px; font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
  font-family: 'Kanit', sans-serif;
}
.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3); font-size: 13px;
  pointer-events: none; z-index: 1;
  transition: color .2s;
}
.input-wrap:focus-within .input-icon { color: var(--orange); }

.form-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 12px 11px 36px;
  font-size: 14px;
  font-family: 'Sarabun', sans-serif;
  color: var(--text); background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(238,77,45,.1);
  background: #fffcfb;
}

/* password toggle */
.pw-toggle {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3); cursor: pointer; font-size: 13px;
  border: none; background: none; padding: 0;
  transition: color .2s;
}
.pw-toggle:hover { color: var(--orange); }

/* password strength bar */
.pw-strength { margin-top: 6px; display: flex; gap: 4px; height: 3px; }
.pw-strength span {
  flex: 1; border-radius: 2px; background: var(--border);
  transition: background .3s;
}
.pw-strength.s1 span:nth-child(1)                          { background: #e53e3e; }
.pw-strength.s2 span:nth-child(-n+2)                       { background: #ed8936; }
.pw-strength.s3 span:nth-child(-n+3)                       { background: #ecc94b; }
.pw-strength.s4 span                                       { background: #26aa63; }
.pw-strength-label { font-size: 10px; color: var(--text-3); margin-top: 3px; }

/* ── SUBMIT BTN ── */
.btn-register {
  width: 100%; padding: 12px;
  background: var(--orange); border: none;
  border-radius: var(--radius); color: #fff;
  font-family: 'Kanit', sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 6px;
  box-shadow: 0 2px 12px rgba(238,77,45,.25);
}
.btn-register:hover {
  background: #d9401f;
  box-shadow: 0 4px 18px rgba(238,77,45,.35);
  transform: translateY(-1px);
}
.btn-register:active { transform: translateY(0); }
.btn-register .spinner {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .6s linear infinite;
}
.btn-register.loading .spinner { display: block; }
.btn-register.loading .btn-text { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── DIVIDER ── */
.divider {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0;
  color: var(--text-3); font-size: 12px;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── LOGIN LINK ── */
.login-link {
  text-align: center; font-size: 13px; color: var(--text-3);
}
.login-link a {
  color: var(--orange); font-weight: 600;
  text-decoration: none; font-family: 'Kanit', sans-serif;
}
.login-link a:hover { text-decoration: underline; }