/* ==========================================================================
   Trang Đăng nhập / Đăng ký (/dang-nhap/, /dang-ky/)
   Bố cục hai cột: khung giới thiệu cộng đồng + thẻ xác thực.
   ========================================================================== */

.opc-auth-body {
  margin: 0;
  background: #F6F9FF;
  color: #001A47;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.opc-auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 100vh;
}

.opc-auth-body.admin-bar .opc-auth {
  min-height: calc(100vh - 32px);
}

/* ---------- Cột giới thiệu ---------- */
.opc-auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 40px 56px 32px;
  color: #FFFFFF;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(0, 102, 255, 0.38), transparent 62%),
    radial-gradient(700px 500px at 92% 96%, rgba(0, 185, 142, 0.22), transparent 60%),
    linear-gradient(150deg, #001A47 0%, #06255A 52%, #0B3277 100%);
  overflow: hidden;
}

.opc-auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.5;
  pointer-events: none;
}

.opc-auth-logo {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 12px;
  background: #FFFFFF;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.opc-auth-logo img {
  display: block;
  height: 38px;
  width: auto;
}

.opc-auth-brand-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 560px;
  margin: auto 0;
}

.opc-auth-eyebrow {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9DCBFF;
}

.opc-auth-brand h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.opc-auth-brand-desc {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.76);
  max-width: 500px;
}

.opc-auth-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  list-style: none;
}

.opc-auth-stats strong {
  display: block;
  font-size: 27px;
  line-height: 1.1;
  font-weight: 800;
}

.opc-auth-stats span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.66);
}

.opc-auth-quote {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-left: 3px solid #00B98E;
  border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.opc-auth-quote footer {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
}

.opc-auth-quote footer strong {
  display: block;
  color: #FFFFFF;
  font-size: 13px;
}

.opc-auth-presence {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.66);
}

.opc-auth-flags {
  display: inline-flex;
  gap: 6px;
}

.opc-auth-flags img {
  width: 24px;
  height: 17px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.opc-auth-brand-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.62);
}

.opc-auth-brand-foot a {
  color: #9DCBFF;
  text-decoration: none;
}

.opc-auth-brand-foot a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* ---------- Cột form ---------- */
.opc-auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 32px 44px;
  background:
    radial-gradient(720px 420px at 100% 0%, rgba(0, 102, 255, 0.10), transparent 60%),
    #F6F9FF;
}

.opc-auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 460px;
  margin-bottom: 22px;
  font-size: 13.5px;
}

.opc-auth-topbar a {
  color: #4A5B78;
  text-decoration: none;
  font-weight: 600;
}

.opc-auth-topbar a:hover {
  color: #0066FF;
}

.opc-auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.opc-auth-card {
  width: 100%;
  max-width: 460px;
  padding: 26px 28px 22px;
  border: 1px solid #E2ECFA;
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 26px 60px rgba(0, 26, 71, 0.09);
  margin: auto 0;
}

.opc-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #F1F5FB;
  margin-bottom: 22px;
}

.opc-auth-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  color: #5A6B87;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.opc-auth-tab:hover {
  color: #0066FF;
}

.opc-auth-tab.is-active {
  background: #FFFFFF;
  color: #001A47;
  box-shadow: 0 2px 8px rgba(0, 26, 71, 0.10);
}

.opc-auth-card h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.opc-auth-lead {
  margin: 6px 0 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #4A5B78;
}

.opc-auth-field {
  display: block;
  margin-bottom: 14px;
}

.opc-auth-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #33425C;
}

.opc-auth-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #DCE5F2;
  border-radius: 10px;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 14.5px;
  color: #001A47;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.opc-auth-field input::placeholder {
  color: #93A2B8;
}

.opc-auth-field input:focus {
  outline: none;
  border-color: #0066FF;
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.14);
}

.opc-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 16px;
  font-size: 12.5px;
  color: #7A8AA6;
}

.opc-auth-inline-link {
  color: #0066FF;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.opc-auth-inline-link:hover {
  text-decoration: underline;
}

.opc-auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: #0066FF;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.opc-auth-submit:hover {
  background: #004FD0;
}

.opc-auth-submit:active {
  transform: translateY(1px);
}

.opc-auth-submit:focus-visible {
  outline: 3px solid rgba(0, 102, 255, 0.35);
  outline-offset: 2px;
}

.opc-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  font-size: 12.5px;
  color: #7A8AA6;
}

.opc-auth-divider::before,
.opc-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #E6EEF9;
}

.opc-auth-sso {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.opc-auth-sso-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid #DCE5F2;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #001A47;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.opc-auth-sso-btn:hover {
  border-color: #0066FF;
  background: #F4F8FF;
}

.opc-auth-sso-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #EEF4FF;
  color: #0066FF;
  font-size: 11.5px;
  font-weight: 800;
}

.opc-auth-note {
  margin: 18px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #7A8AA6;
  text-align: center;
}

.opc-auth-legal {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 12.5px;
}

.opc-auth-legal a {
  color: #7A8AA6;
  text-decoration: none;
}

.opc-auth-legal a:hover {
  color: #0066FF;
  text-decoration: underline;
}

/* ---------- Chọn loại tài khoản (trang đăng ký) ---------- */
.opc-auth-types {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.opc-auth-types legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: #33425C;
}

.opc-auth-type {
  position: relative;
  display: block;
  margin-bottom: 10px;
  cursor: pointer;
}

.opc-auth-type input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.opc-auth-type-body {
  position: relative;
  display: block;
  padding: 14px 88px 14px 14px;
  border: 1px solid #DCE5F2;
  border-radius: 12px;
  background: #FFFFFF;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.opc-auth-type:hover .opc-auth-type-body {
  border-color: #9DCBFF;
}

.opc-auth-type input:checked + .opc-auth-type-body {
  border-color: #0066FF;
  background: #F5F9FF;
  box-shadow: inset 0 0 0 1px #0066FF;
}

.opc-auth-type input:focus-visible + .opc-auth-type-body {
  outline: 3px solid rgba(0, 102, 255, 0.28);
  outline-offset: 2px;
}

.opc-auth-type-title {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: #001A47;
}

.opc-auth-type-desc {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #5A6B87;
}

.opc-auth-type-pick {
  position: absolute;
  top: 14px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #EEF4FF;
  color: #0066FF;
  font-size: 12px;
  font-weight: 700;
}

.opc-auth-type input:checked + .opc-auth-type-body .opc-auth-type-pick {
  background: #0066FF;
  color: #FFFFFF;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .opc-auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .opc-auth-brand {
    gap: 18px;
    padding: 26px 24px 24px;
  }

  .opc-auth-brand-body {
    margin: 6px 0 0;
    gap: 12px;
  }

  .opc-auth-brand h1 {
    font-size: 27px;
  }

  .opc-auth-brand-desc {
    font-size: 14px;
  }

  .opc-auth-stats {
    padding-top: 14px;
  }

  .opc-auth-stats strong {
    font-size: 22px;
  }

  .opc-auth-quote,
  .opc-auth-presence {
    display: none;
  }

  .opc-auth-brand-foot {
    padding-top: 14px;
  }

  .opc-auth-panel {
    padding: 20px 20px 36px;
  }

  .opc-auth-topbar {
    margin-bottom: 16px;
  }

  .opc-auth-card {
    padding: 22px 20px 18px;
  }
}

@media (max-width: 560px) {
  .opc-auth-card h2 {
    font-size: 22px;
  }

  .opc-auth-sso {
    grid-template-columns: minmax(0, 1fr);
  }

  .opc-auth-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
