:root {
  --student-card-green: #087454;
  --student-card-green-dark: #065b43;
  --student-card-soft: #edf7f3;
}

.auth-method-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: #89938f;
  font-size: 12px;
  font-weight: 600;
}

.auth-method-divider::before,
.auth-method-divider::after {
  height: 1px;
  background: #e3e8e5;
  content: "";
}

.student-card-login-entry {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid #cfe1da;
  border-radius: 12px;
  color: #173d31;
  background: #f7fbf9;
  text-align: left;
}

.student-card-login-entry > svg:first-child {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 10px;
  color: #fff;
  background: var(--student-card-green);
}

.student-card-login-entry > svg:last-child {
  width: 18px;
  color: #73817b;
}

.student-card-login-entry span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.student-card-login-entry strong {
  font-size: 14px;
  font-weight: 750;
}

.student-card-login-entry small {
  overflow: hidden;
  color: #68766f;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-card-login-entry:hover {
  border-color: #9fc7b8;
  background: var(--student-card-soft);
}

.student-card-login-wrap {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  background: #f4f7f5;
}

.student-card-login-shell {
  width: min(620px, 100%);
  min-width: 0;
  padding: 24px;
  border: 1px solid #dce5e1;
  border-radius: 18px;
  background: #fff;
}

.student-card-login-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-bottom: 18px;
}

.student-card-login-head > div {
  min-width: 0;
}

.student-card-login-head > div > span {
  display: block;
  margin: 2px 0 4px;
  color: var(--student-card-green);
  font-size: 12px;
  font-weight: 750;
}

.student-card-login-head h1 {
  margin: 0;
  color: #15211c;
  font-size: clamp(22px, 5vw, 29px);
  line-height: 1.25;
  letter-spacing: 0;
}

.student-card-login-head p {
  margin: 7px 0 0;
  color: #64716b;
  font-size: 14px;
  line-height: 1.55;
}

.student-card-login-head .icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid #dde4e1;
  border-radius: 10px;
  color: #3f4c46;
  background: #fff;
}

.student-card-live-login.student-card-camera {
  position: relative;
  width: min(100%, 430px);
  margin-inline: auto;
  height: auto;
  min-height: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #0b1612;
  box-shadow: none;
}

.student-card-live-login video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-card-live-login .student-card-camera-shade {
  position: absolute;
  inset: 0;
  background: rgba(4, 14, 10, 0.16);
  pointer-events: none;
}

.student-card-live-login .student-card-hud {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72%;
  height: auto;
  aspect-ratio: 0.63 / 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 13px;
  box-shadow: none;
}

.student-card-barcode-zone {
  position: absolute;
  right: 7%;
  bottom: 7%;
  left: 7%;
  height: 24%;
  border: 2px solid rgba(117, 230, 164, 0.92);
  border-radius: 8px;
  background: rgba(8, 83, 59, 0.08);
  box-shadow: 0 0 0 1px rgba(3, 25, 17, 0.35), 0 0 18px rgba(117, 230, 164, 0.22);
}

.student-card-barcode-zone::before,
.student-card-barcode-zone::after {
  position: absolute;
  top: 16%;
  bottom: 16%;
  width: 2px;
  content: "";
  background: rgba(255, 255, 255, 0.76);
}

.student-card-barcode-zone::before { left: 10%; }
.student-card-barcode-zone::after { right: 10%; }

.student-card-barcode-camera .student-card-hud {
  border-color: rgba(184, 239, 217, 0.72);
}

.student-card-live-login[data-side="back"] .student-card-hud {
  border-color: rgba(184, 239, 217, 0.72);
}

.student-card-live-login .student-card-hud-copy {
  position: absolute;
  right: 10px;
  bottom: 9px;
  left: 10px;
  width: auto;
  display: grid;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #fff;
  background: rgba(5, 19, 14, 0.72);
  backdrop-filter: blur(8px);
  transform: none;
  text-align: left;
}

.student-card-live-login .student-card-hud-copy strong,
.student-card-live-login .student-card-hud-copy small {
  color: inherit;
  line-height: 1.35;
}

.student-card-live-login .student-card-hud-copy strong {
  font-size: 13px;
}

.student-card-live-login .student-card-hud-copy small {
  font-size: 11px;
  opacity: 0.84;
}

.student-card-live-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 19, 14, 0.72);
  font-size: 11px;
  font-weight: 700;
}

.student-card-live-indicator i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #36dc98;
  box-shadow: 0 0 0 4px rgba(54, 220, 152, 0.16);
}

.student-card-login-progress {
  position: relative;
  height: 5px;
  margin: 15px 0 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eeeb;
}

.student-card-login-progress i {
  display: block;
  width: var(--student-card-progress, 8%);
  height: 100%;
  border-radius: inherit;
  background: var(--student-card-green);
  transition: width 260ms ease-out;
}

.student-card-login-status {
  min-height: 22px;
  margin: 0;
  color: #293a33;
  font-size: 14px;
  font-weight: 650;
  text-align: center;
}

.student-card-login-privacy,
.student-card-login-confirmed,
.student-card-login-error {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 13px;
  border-radius: 12px;
  color: #345047;
  background: var(--student-card-soft);
}

.student-card-login-privacy svg,
.student-card-login-confirmed svg,
.student-card-login-error svg {
  width: 22px;
  height: 22px;
  margin: 1px 0 0 2px;
  color: var(--student-card-green);
}

.student-card-login-privacy span,
.student-card-login-confirmed span,
.student-card-login-error span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.student-card-login-privacy strong,
.student-card-login-confirmed strong {
  font-size: 13px;
}

.student-card-login-privacy small,
.student-card-login-confirmed small {
  color: #63736c;
  font-size: 12px;
  line-height: 1.45;
}

.student-card-login-password-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.student-card-login-completing {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 18px;
  color: #29483d;
  background: var(--student-card-soft);
  text-align: center;
}

.student-card-login-completing-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 2px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--student-card-green);
}

.student-card-login-completing-mark svg {
  width: 25px;
  height: 25px;
}

.student-card-login-completing small {
  max-width: 380px;
  color: #61736c;
  font-size: 12px;
  line-height: 1.5;
}

.student-card-login-completing > i {
  width: min(240px, 80%);
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #d8e5df;
}

.student-card-login-completing > i > b {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--student-card-green);
  animation: student-card-completing 900ms ease-in-out infinite alternate;
}

.student-card-login-setting {
  display: grid;
  gap: 13px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2e8e5;
}

.student-card-login-setting-status {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.student-card-login-setting-status > svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 10px;
  color: var(--student-card-green);
  background: var(--student-card-soft);
}

.student-card-login-setting-status > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.student-card-login-setting-status strong {
  color: #24342e;
  font-size: 14px;
}

.student-card-login-setting-status small {
  color: #68766f;
  font-size: 12px;
  line-height: 1.45;
}

.student-card-login-setting-status em {
  padding: 5px 8px;
  border-radius: 999px;
  color: #66736d;
  background: #f0f3f2;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.student-card-login-setting.is-enabled .student-card-login-setting-status em {
  color: var(--student-card-green-dark);
  background: var(--student-card-soft);
}

.student-card-login-setting > label {
  display: grid;
  gap: 7px;
  color: #36453f;
  font-size: 13px;
  font-weight: 700;
}

.student-card-login-setting > p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: #68766f;
  font-size: 12px;
  line-height: 1.5;
}

.student-card-login-setting > p svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--student-card-green);
}

.student-card-login-setting > button {
  justify-self: start;
}

.student-card-login-setting.is-unavailable {
  opacity: 0.78;
}

@keyframes student-card-completing {
  from { transform: translateX(0); }
  to { transform: translateX(138%); }
}

.student-card-login-password-form label {
  display: grid;
  gap: 7px;
  color: #26352f;
  font-size: 13px;
  font-weight: 700;
}

.student-card-login-password-form .primary,
.student-card-login-password-form .ghost,
.student-card-login-error-actions button {
  width: 100%;
  min-height: 48px;
}

.student-card-login-error {
  color: #8b302b;
  background: #fff2f1;
}

.student-card-login-error svg {
  color: #c8463d;
}

.student-card-login-error-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 26px 18px;
  color: #425048;
  background: #f5f7f6;
  text-align: center;
}

.student-card-login-error-card svg {
  width: 34px;
  height: 34px;
  color: var(--student-card-green);
}

.student-card-login-error-card span {
  color: #68746e;
  font-size: 13px;
}

.student-card-login-error-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .student-card-login-wrap {
    align-items: start;
    padding: max(12px, env(safe-area-inset-top)) 0 max(12px, env(safe-area-inset-bottom));
    background: #fff;
  }

  .student-card-login-shell {
    width: 100%;
    padding: 18px 16px 22px;
    border: 0;
    border-radius: 0;
  }

  .student-card-login-head {
    margin-bottom: 14px;
  }

  .student-card-live-login.student-card-camera {
    border-radius: 12px;
  }

  .student-card-login-entry small {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .student-card-login-progress i,
  .student-card-live-login .student-card-scanline {
    transition: none;
    animation: none;
  }

  .student-card-login-completing > i > b {
    width: 100%;
    animation: none;
  }
}

.student-current-class-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--student-card-green);
  font-size: 12px;
  font-weight: 750;
}

.student-current-class-box > p#studentCurrentIdPreview {
  margin: 7px 0 12px;
  color: #6b7771;
  font-size: 12px;
  line-height: 1.45;
}

.student-current-class-box > p#studentCurrentIdPreview[data-valid="true"] {
  color: var(--student-card-green-dark);
  font-weight: 700;
}

.student-current-id-confirm {
  display: flex !important;
  align-items: flex-start;
  gap: 9px !important;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid #dfe7e3;
  color: #35443e !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.45;
}

.student-current-id-confirm input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 1px 0 0;
  accent-color: var(--student-card-green);
}
