:root {
  --blue: #2479bc;
  --navy: #102d50;
  --ink: #233c56;
  --muted: #78889b;
  --line: #dfe8f1;
  --danger: #b93850;
  --green: #168263;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #edf3f9;
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #8ac7fb;
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

/* BỐ CỤC CHÍNH */

.auth-page {
  display: grid;
  place-items: center;
  padding: 30px;
  background:
    radial-gradient(ellipse at 0 0, #dcecfb, transparent 50%),
    radial-gradient(ellipse at 100% 100%, #e0eaf4, transparent 50%),
    #f2f6fb;
}

.auth-layout {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  background: #fff;
  border: 1px solid #e0e8f2;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 80px #17375414;
}

/* KHỐI GIỚI THIỆU */

.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 38px 40px;
  color: #fff;
  background: linear-gradient(
    150deg,
    #0b2747 0%,
    #164b7d 58%,
    #2479bc 100%
  );
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border: 1px solid #ffffff12;
  border-radius: 50%;
  width: 440px;
  height: 440px;
  right: -250px;
  top: 90px;
  pointer-events: none;
}

.auth-visual::after {
  width: 600px;
  height: 600px;
  right: -330px;
  top: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff40;
  border-radius: 13px;
  background: #ffffff0e;
  font-weight: 800;
  font-size: 19px;
}

.brand strong {
  display: block;
  font-size: 12px;
  letter-spacing: 1.5px;
}

.brand small {
  display: block;
  color: #a9c3dd;
  font-size: 11px;
  margin-top: 2px;
}

.visual-copy {
  position: relative;
  z-index: 1;
  margin-top: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid #ffffff25;
  border-radius: 30px;
  background: #ffffff08;
  color: #d4e6f7;
  font-size: 10px;
  letter-spacing: 1.4px;
}

.eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  background: #85d7c0;
  border-radius: 50%;
}

.visual-copy h1 {
  margin: 18px 0 15px;
  font-size: clamp(30px, 3.7vw, 43px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -1.2px;
}

.visual-copy h1 span {
  color: #9ed7ff;
}

.visual-copy > p {
  max-width: 340px;
  margin: 0;
  color: #b9cee2;
  line-height: 1.9;
  font-size: 13px;
}

/* KHUNG MINH HỌA HỌC VỤ */

.preview {
  position: relative;
  z-index: 1;
  margin: 32px 0;
  border: 1px solid #ffffff25;
  border-radius: 16px;
  background: linear-gradient(
    130deg,
    #ffffff13,
    #ffffff06
  );
  padding: 20px;
  box-shadow: 0 15px 35px #06172e22;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ffffff16;
}

.preview-header strong {
  font-size: 12px;
  font-weight: 600;
}

.preview-dots {
  display: flex;
  gap: 4px;
}

.preview-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a5c2df;
}

.preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 17px;
}

.preview-icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 9px;
  background: #79bfff1a;
  color: #a9d7ff;
}

.preview-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}

.preview-row strong {
  display: block;
  font-weight: 500;
  font-size: 12px;
}

.preview-row small {
  display: block;
  font-size: 10px;
  color: #abc5dd;
}

.preview-check {
  margin-left: auto;
  color: #8fdfc6;
  font-size: 15px;
}

.visual-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  color: #9db9d3;
  font-size: 11px;
}

.visual-footer strong {
  color: #c9dded;
  font-weight: 500;
}

/* FORM */

.auth-content {
  padding: 42px 46px;
  align-self: center;
}

.form-kicker {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
}

.form-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -.7px;
  color: #18344f;
}

.form-description {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.form-grid {
  display: grid;
  gap: 17px;
}

.field {
  min-width: 0;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #354e68;
}

.required {
  color: #bf4a60;
  font-weight: 400;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 13px;
  color: #91a2b4;
  display: flex;
  pointer-events: none;
}

.input-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-wrap input {
  width: 100%;
  min-height: 47px;
  padding: 11px 13px 11px 40px;
  border: 1px solid #dce5ee;
  border-radius: 9px;
  background: #fbfcfe;
  color: #213c57;
  outline: none;
  transition:
    border-color .15s,
    box-shadow .15s,
    background .15s;
}

.input-wrap input::placeholder {
  color: #a0adbb;
  font-size: 12px;
}

.input-wrap input:focus {
  border-color: #5a9ed5;
  background: #fff;
  box-shadow: 0 0 0 3px #2479bc10;
}

.input-wrap.password input {
  padding-right: 59px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 6px 8px;
  color: #55718d;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.password-toggle:hover {
  background: #edf3f8;
}

.field-help {
  display: block;
  margin-top: 5px;
  color: #8997a7;
  font-size: 10px;
  line-height: 1.6;
}

.caps-hint {
  color: #a06b17;
}

.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

/* THÔNG BÁO CHỜ DUYỆT */

.approval-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dcebf7;
  border-radius: 9px;
  background: #f3f8fd;
}

.approval-note svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke: #4187bd;
  fill: none;
  stroke-width: 1.7;
}

.approval-note strong {
  display: block;
  font-size: 11px;
  color: #3e709a;
  font-weight: 600;
}

.approval-note p {
  margin: 3px 0 0;
  color: #7791a7;
  font-size: 10px;
  line-height: 1.7;
}

/* NÚT GỬI */

.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 47px;
  border: 1px solid #2171ae;
  border-radius: 9px;
  background: linear-gradient(100deg, #2479bc, #1c69a5);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 6px 16px #2479bc1c;
  transition: filter .15s, transform .15s;
}

.submit-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.submit-button:disabled {
  opacity: .7;
  cursor: wait;
  transform: none;
}

.button-arrow {
  font-size: 18px;
  font-weight: 400;
}

.button-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid #ffffff55;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.submit-button.is-loading .button-spinner {
  display: block;
}

.submit-button.is-loading .button-arrow {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* THÔNG BÁO FORM */

.auth-message {
  margin: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.auth-message:empty {
  display: none;
}

.auth-message:not(:empty) {
  padding: 11px 12px;
  border: 1px solid #dcebf7;
  border-radius: 8px;
  background: #f3f8fd;
  color: #356e9b;
}

.auth-message.error:not(:empty) {
  border-color: #f1d6dc;
  background: #fff5f6;
  color: var(--danger);
}

.auth-message.success:not(:empty) {
  border-color: #d3eade;
  background: #f0faf4;
  color: #287b55;
}

.form-switch {
  text-align: center;
  margin: 23px 0 0;
  padding-top: 20px;
  border-top: 1px solid #edf1f5;
  font-size: 12px;
  color: #8a98a8;
}

.form-switch a {
  font-weight: 600;
  margin-left: 4px;
}

.form-footer {
  margin-top: 20px;
  text-align: center;
  color: #9aa7b5;
  font-size: 10px;
}

.strength {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 7px;
}

.strength meter {
  width: 85px;
  height: 7px;
}

.strength small {
  font-size: 10px;
  color: #8898a9;
}

/* RESPONSIVE */

@media (min-width: 1000px) {
  .register-layout {
    grid-template-columns: .85fr 1.15fr;
  }

  .register-layout .auth-content {
    padding: 36px 40px;
  }

  .register-layout .form-description {
    margin-bottom: 20px;
  }

  .register-layout .form-grid {
    gap: 14px;
  }
}

@media (max-width: 800px) {
  .auth-page {
    padding: 20px;
  }

  .auth-layout {
    max-width: 530px;
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .auth-visual {
    padding: 25px 30px;
  }

  .visual-copy {
    margin-top: 24px;
  }

  .visual-copy h1 {
    font-size: 29px;
    margin: 12px 0 9px;
  }

  .visual-copy > p {
    max-width: none;
    font-size: 12px;
  }

  .preview,
  .visual-footer,
  .eyebrow {
    display: none;
  }

  .auth-content {
    padding: 30px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
    border-radius: 10px;
    font-size: 16px;
  }

  .brand strong {
    font-size: 11px;
  }

  .form-title {
    font-size: 27px;
  }

  .form-description {
    margin-bottom: 20px;
  }
}

@media (max-width: 400px) {
  .auth-page {
    padding: 12px;
  }

  .auth-content,
  .auth-visual {
    padding: 23px;
  }

  .two-fields {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .form-grid {
    gap: 14px;
  }

  .visual-copy h1 {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .submit-button:hover {
    transform: none;
  }
}