*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Google Sans', 'Roboto', -apple-system, sans-serif;
  background: #f0f4f9;
  color: #1f1f1f;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-wrapper {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 12vh;
}

.logo-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background: #f0f4f9;
  z-index: 100;
}

.logo-screen-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.google-logo-img {
  height: 128px;
  width: 128px;
  opacity: 0;
  transform: scale(0.8);
  flex-shrink: 0;
  filter: grayscale(1) brightness(1.4) contrast(0.6);
}

.logo-text-stack {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 16px;
  white-space: nowrap;
}

.logo-text-google,
.logo-text-portal {
  font-family: 'Google Sans', 'Product Sans', sans-serif;
  font-size: 72px;
  font-weight: 400;
  color: #5F6469;
  letter-spacing: -0.5px;
  line-height: 1;
  opacity: 0;
  transform: scale(1.12);
  filter: blur(2px);
}


.hidden {
  display: none !important;
}

.otp-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 614px;
  padding: 0 32px 24px;
  opacity: 0;
  transform: scale(0.92);
  gap: 0;
}

.signin-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1040px;
  background: #fff;
  border-radius: 28px;
  padding: 48px 36px 36px;
  min-height: 402px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 4px 8px 3px rgba(0, 0, 0, 0.05);
}

.otp-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #e8eaed;
  overflow: hidden;
  z-index: 10;
  transition: opacity 300ms ease;
}

.otp-progress-bar.done {
  opacity: 0;
}

.otp-progress-bar-inner {
  width: 40%;
  height: 100%;
  background: #1a73e8;
  border-radius: 2px;
  animation: otp-indeterminate 2s ease-in-out infinite;
}

@keyframes otp-indeterminate {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(180%); }
  100% { transform: translateX(350%); }
}

.signin-left {
  flex: 0 0 auto;
  padding-right: 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: flex-start;
}

.signin-right {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding-top: 0;
}

.signin-right-inner {
  width: 458px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 15px;
}

.g-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.card-brand {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-icon-svg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text-google {
  font-family: 'Google Sans', 'Product Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #5F6469;
}

.brand-text-portal {
  font-family: 'Google Sans', 'Product Sans', sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: #5F6469;
}

.signin-heading {
  font-size: 2.75rem;
  font-weight: 400;
  color: #1f1f1f;
  line-height: 44px;
  margin-top: 24px;
  font-family: 'Google Sans', roboto, arial, sans-serif;
}

.signin-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #1f1f1f;
  line-height: 24px;
  margin-top: 16px;
  font-family: 'Google Sans', roboto, arial, sans-serif;
}

.subtitle-link {
  color: #0b57d0;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 1px;
  border-radius: 8px;
}

.subtitle-link:hover {
  background: rgb(11 87 208 / 8%);
}

.signin-subtitle {
  position: relative;
}

/* ── Portal info modal (centered overlay) ──────────────── */

.portal-info-scrim {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2001;
  background: rgba(0, 0, 0, 0);
  transition: background 0.15s ease;
}

.portal-info-scrim.visible {
  background: rgba(0, 0, 0, 0.6);
}

.portal-info-dialog {
  width: 337px;
  border-radius: 23px;
  background: #f0f4f9;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 3px 0px, rgba(0, 0, 0, 0.15) 0px 4px 8px 3px;
  display: flex;
  flex-direction: column;
  padding: 0;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.portal-info-scrim.visible .portal-info-dialog {
  opacity: 1;
  transform: scale(1);
}

.portal-info-title {
  font-size: 24px;
  font-weight: 400;
  color: #1f1f1f;
  padding: 24px 24px 13px;
  font-family: "Google Sans", roboto, arial, sans-serif;
  margin: 0;
}

.portal-info-content {
  padding: 0 24px;
}

.portal-info-row {
  font-size: 14px;
  font-weight: 400;
  color: #1f1f1f;
  line-height: 20px;
  font-family: "Google Sans", roboto, arial, sans-serif;
}

.portal-info-link {
  color: #0b57d0;
  text-decoration: none;
}

.portal-info-link:hover {
  text-decoration: underline;
}

.portal-info-actions {
  display: flex;
  justify-content: flex-end;
  padding: 16px 24px 16px;
}

.portal-info-got-it {
  font-size: 14px;
  font-weight: 500;
  color: #0b57d0;
  background: transparent;
  border: none;
  padding: 0 16px;
  height: 40px;
  border-radius: 23px;
  cursor: pointer;
  font-family: "Google Sans", roboto, arial, sans-serif;
  letter-spacing: 0.25px;
}

.portal-info-got-it:hover {
  background: rgba(11, 87, 208, 0.04);
}

.no-code-dialog {
  width: 400px;
}

.no-code-illustration {
  display: flex;
  justify-content: center;
  padding: 24px 24px 0;
}

.no-code-illustration img {
  display: block;
}

.input-hint {
  font-size: 16px;
  font-weight: 400;
  color: #1f1f1f;
  line-height: 1.5;
  margin-bottom: 16px;
}

.otp-input-wrapper {
  position: relative;
  margin-bottom: 4px;
}

.otp-input-inner {
  display: flex;
  align-items: center;
  border: 1px solid #747775;
  border-radius: 4px;
  height: 54px;
  padding: 0;
  transition: border-color 0.2s;
  background: transparent;
}

.otp-input-wrapper:focus-within .otp-input-inner {
  border-color: #1a73e8;
  border-width: 2px;
  padding: 0;
}

.otp-input-wrapper.input-error .otp-input-inner {
  border-color: #ab2418;
}

.otp-input-wrapper.input-error:focus-within .otp-input-inner {
  border-color: #ab2418;
  border-width: 2px;
  padding: 0;
}

.input-prefix {
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
  color: #1f1f1f;
  flex-shrink: 0;
  user-select: none;
  padding-left: 15px;
  padding-right: 12px;
}

.otp-input-field {
  position: relative;
  flex: 1;
  height: 100%;
}

.otp-input {
  width: 100%;
  height: 100%;
  padding: 0;
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
  border: none;
  outline: none;
  color: #1f1f1f;
  background: transparent;
}

.otp-input::placeholder {
  color: transparent;
}

.otp-placeholder {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #444746;
  pointer-events: none;
}

.otp-input:focus ~ .otp-placeholder,
.otp-input:not(:placeholder-shown) ~ .otp-placeholder {
  display: none;
}

.otp-input.input-error {
}

.error-msg {
  align-items: flex-start;
  display: flex;
  font-family: "Google Sans", roboto, "Noto Sans Myanmar UI", "Noto Sans Khmer", arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.00625rem;
  line-height: 1.3333333333;
  margin-top: 4px;
  color: #ab2418;
  text-align: left;
  margin-bottom: 8px;
  padding: 1px 0px 0;
  gap: 8px;
}

.error-msg svg {
  flex-shrink: 0;
}

.otp-label {
  position: absolute;
  left: 43px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #444746;
  pointer-events: none;
  transition: top 0.2s, font-size 0.2s, color 0.2s;
  background: #fff;
  padding: 0 4px;
}

.otp-placeholder {
  display: none;
}

.otp-input-wrapper:focus-within .otp-label,
.otp-input-wrapper.has-value .otp-label {
  top: 0;
  font-size: 12px;
}

.otp-input-wrapper:focus-within .otp-label {
  color: #1a73e8;
}

.otp-input-wrapper.has-value .otp-label {
  color: #444746;
}

.otp-input-wrapper.has-value:focus-within .otp-label {
  color: #1a73e8;
}

.otp-input-wrapper.input-error .otp-label {
  color: #ab2418;
  top: 0;
  font-size: 12px;
}

.otp-input-wrapper.input-error:focus-within .otp-label {
  color: #ab2418;
}

.error-msg {
  color: #d93025;
  font-size: 13px;
  text-align: left;
  margin-bottom: 8px;
  padding: 1px 0px 0;
}

.forgot-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: rgb(11, 87, 208);
  text-decoration: none;
  letter-spacing: 0.25px;
  padding: 4px 1px;
  border-radius: 4px;
  margin-top: 4px;
  width: fit-content;
}

.forgot-link:hover {
  background: rgb(11 87 208 / 8%);
  border-radius: 8px;
}

.privacy-notice {
  margin-top: 32px;
  padding-bottom: 9px;
  padding-top: 9px;
  color: #444746;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0rem;
  line-height: 1.4285714286;
}

.privacy-notice a {
  color: #0b57d0;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.015625rem;
  border-radius: 4px;
  cursor: pointer;
}

.privacy-notice a:hover {
  text-decoration: underline;
}

.signin-actions {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  margin-top: 30px;
  width: 100%;
  gap: 40px;
}

.btn-primary {
  background: rgb(11, 87, 208);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0 24px;
  height: 40px;
  font-size: 14px;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  letter-spacing: 0.25px;
  min-width: 78px;
}

.btn-primary:hover:not(:disabled) {
  background: rgb(9, 71, 171);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.btn-primary:disabled {
  background: #0b57d0;
  color: #ffffff;
  cursor: not-allowed;
}

.btn-primary.loading {
  position: relative;
  color: transparent;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -9px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-secondary {
  background: transparent;
  color: rgb(11, 87, 208);
  border: none;
  border-radius: 20px;
  padding: 0 16px;
  height: 40px;
  font-size: 14px;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.25px;
}

.btn-secondary:hover {
  background: rgba(11, 87, 208, 0.04);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  .otp-screen {
    padding: 48px 24px 24px;
    min-height: auto;
  }

  .signin-container {
    flex-direction: column;
    max-width: 460px;
  }

  .signin-left {
    padding-right: 0;
    margin-bottom: 32px;
  }

  .signin-right {
    padding-left: 0;
    padding-top: 0;
    align-items: flex-start;
  }

  .signin-right-inner {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .google-logo-img {
    height: 76px;
    width: 76px;
  }
  .logo-text-google,
  .logo-text-portal {
    font-size: 34px;
  }
}

.page-footer {
  width: 100%;
  max-width: 1040px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
  padding: 0px 2px;
  background: transparent;
  font-size: 12px;
  color: #1f1f1f;
  font-family: 'Roboto', sans-serif;
  margin: 8px 0;
}

.footer-locale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  width: 200px;
  padding: 4px 8px;
  border-radius: 4px;
}

.footer-locale-arrow {
  flex-shrink: 0;
}

.footer-locale.open .footer-locale-arrow {
  transform: rotate(180deg);
}

.footer-locale:hover {
  background: #e2e7eb;
}

.footer-locale.open {
  outline: 2px solid #1a73e8;
  margin: 9px 0;
}

.locale-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 4px;
  background: #fff;
  border: none;
  border-radius: 4px;
  min-width: 240px;
  box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12);
  z-index: 10;
  padding: 4px 0;
}

.locale-option {
  padding: 8px 16px;
  font-size: 14px;
  color: #1f1f1f;
  background: rgba(11, 87, 208, 0.08);
  cursor: default;
}

.locale-notice {
  padding: 8px 16px;
  font-size: 12px;
  color: #5f6368;
  border-top: 1px solid #e0e0e0;
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a {
  align-content: center;
  border-radius: 8px;
  color: #1f1f1f;
  display: flex;
  flex-wrap: wrap;
  font-family: "Google Sans", roboto, "Noto Sans Myanmar UI", "Noto Sans Khmer", arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.00625rem;
  line-height: 1.3333333333;
  outline: none;
  padding: 8px 12px;
  text-decoration: none;
}

.footer-links a:hover {
  color: #000;
  background: #e2e7eb;
}
