
:root {
  --blue: #2f3aa3;
  --green: #59c13b;
  --text: #3a3a42;
  --muted: #6d7680;
  --line: #cfd4db;
  --bg: #f2f2f4;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.login-page {
  min-height: 100vh;
  padding: 54px 20px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login-card {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 26px rgba(0,0,0,.12);
  padding: 34px 34px 32px;
}
.login-logo {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
}
.logo-word {
  color: var(--blue);
  font-size: 54px;
  font-weight: 800;
  line-height: .95;
  letter-spacing: -2px;
}
.logo-mark {
  display: grid;
  grid-template-columns: repeat(3, 10px);
  gap: 4px;
  transform: rotate(45deg);
  margin-top: -4px;
}
.logo-mark i {
  width: 10px;
  height: 10px;
  display: block;
  background: #18a545;
}
.logo-mark i:nth-child(2),
.logo-mark i:nth-child(4),
.logo-mark i:nth-child(6),
.logo-mark i:nth-child(8) { background: #d6403d; }
.form-block { width: 100%; }
input[type="text"] {
  width: 100%;
  height: 48px;
  border: 2px solid #cfd4db;
  border-radius: 5px;
  padding: 0 14px;
  font-size: 14px;
  color: #444;
  outline: none;
}
input[type="text"]::placeholder { color: #7b838e; }
.helper-lines {
  margin: 12px 0 12px;
  color: #6f7780;
  font-size: 13px;
  line-height: 1.55;
}
.helper-lines strong { color: #666f78; }
.btn {
  width: 100%;
  height: 44px;
  border-radius: 5px;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
}
.btn-primary { background: var(--blue); }
.btn-green { background: var(--green); }
.forgot-link {
  display: block;
  margin: 20px 0 18px;
  text-align: center;
  color: var(--blue);
  font-size: 17px;
}
.social-title {
  margin: 0 0 14px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #5a5a61;
}
.social-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 26px;
}
.social-btn {
  min-width: 140px;
  height: 42px;
  border: 2px solid var(--blue);
  border-radius: 5px;
  background: #fff;
  color: var(--blue);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  cursor: pointer;
}
.social-icon {
  font-size: 26px;
  line-height: 1;
  color: #000;
}
.google-g {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  background: conic-gradient(#ea4335 0 25%, #fbbc05 25% 50%, #34a853 50% 75%, #4285f4 75% 100%);
  color: #fff;
  font-size: 17px;
}
.register-line {
  text-align: center;
  margin: 0 0 24px;
  font-size: 17px;
  color: #5c5d63;
}
.register-line a {
  color: var(--blue);
  font-weight: 500;
}
.policy-links {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.policy-links a {
  color: #5f6368;
  font-size: 14px;
}
.bottom-language {
  margin-top: 16px;
}
.lang-select {
  position: relative;
}
.lang-current {
  border: none;
  background: transparent;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.globe-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
}
.chev {
  font-size: 14px;
  transition: transform .2s ease;
}
.lang-select.open .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: 164px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
  overflow: hidden;
  display: none;
}
.lang-select.open .lang-menu { display: block; }
.lang-menu button {
  width: 100%;
  height: 48px;
  border: none;
  background: #fff;
  color: #3c4351;
  font-size: 14px;
  cursor: pointer;
}
.lang-menu button:hover,
.lang-menu button.active {
  background: #f3f5fb;
  color: var(--blue);
  font-weight: 700;
}
@media (max-width: 760px) {
  .login-page { padding: 24px 16px 36px; }
  .login-card { padding: 32px 20px; border-radius: 18px; }
  .logo-word { font-size: 48px; }
  .logo-mark { grid-template-columns: repeat(3, 9px); gap: 4px; }
  .logo-mark i { width: 9px; height: 9px; }
  input[type="text"] { font-size: 20px; height: 52px; }
  .btn { font-size: 14px; height: auto; min-height: 52px; padding: 12px 16px; }
  .social-title, .register-line, .forgot-link { font-size: 14px; }
  .social-row { flex-direction: column; align-items: center; }
  .social-btn { width: 100%; max-width: 260px; font-size: 20px; }
  .policy-links a { font-size: 13px; }
}


/* compact login page overrides */
.login-card { max-width: 560px; }
.helper-lines strong { font-weight: 700; }
.btn { font-weight: 500; }
.social-row { align-items: center; }
.social-btn { padding: 0 14px; }
.register-line a { font-weight: 600; }
.policy-links a { line-height: 1.25; }
@media (max-width: 760px) {
  .login-page { padding: 20px 14px 28px; }
  .login-card { width: min(100%, 440px); padding: 26px 18px 24px; }
  .logo-word { font-size: 42px; }
  .btn { min-height: 44px; }
}


/* tuned desktop layout to match the reference more closely */
@media (min-width: 761px) {
  .login-page {
    padding: 34px 24px 28px;
    justify-content: flex-start;
  }

  .login-card {
    width: 100%;
    max-width: 410px;
    padding: 28px 26px 24px;
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.10);
  }

  .login-logo {
    gap: 7px;
    margin-bottom: 22px;
  }

  .logo-word {
    font-size: 62px;
    line-height: 0.94;
    letter-spacing: -2.2px;
  }

  .logo-mark {
    grid-template-columns: repeat(3, 11px);
    gap: 4px;
    margin-top: -2px;
  }

  .logo-mark i {
    width: 11px;
    height: 11px;
  }

  input[type="text"] {
    height: 44px;
    padding: 0 13px;
    font-size: 16px;
    border-radius: 4px;
  }

  .helper-lines {
    margin: 10px 0 12px;
    font-size: 12px;
    line-height: 1.45;
  }

  .btn {
    height: 42px;
    margin-top: 9px;
    font-size: 16px;
    border-radius: 4px;
  }

  .forgot-link {
    margin: 20px 0 16px;
    font-size: 16px;
  }

  .social-title {
    margin: 0 0 14px;
    font-size: 16px;
  }

  .social-row {
    gap: 14px;
    margin-bottom: 22px;
  }

  .social-btn {
    min-width: 106px;
    height: 38px;
    gap: 8px;
    font-size: 16px;
    border-radius: 4px;
  }

  .social-icon {
    font-size: 24px;
  }

  .google-g {
    width: 22px;
    height: 22px;
    font-size: 15px;
  }

  .register-line {
    margin: 0 0 24px;
    font-size: 15px;
  }

  .policy-links {
    gap: 7px;
  }

  .policy-links a {
    font-size: 12px;
  }

  .bottom-language {
    margin-top: 12px;
  }

  .lang-current {
    font-size: 15px;
    gap: 6px;
  }

  .globe-icon {
    width: 20px;
    height: 20px;
    font-size: 8px;
  }
}


/* final logo centering and size refinement */
.login-logo {
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 761px) {
  .login-logo {
    gap: 6px;
    margin: 0 auto 20px;
    align-items: flex-start;
    justify-content: center;
  }

  .logo-word {
    font-size: 56px;
    line-height: 0.95;
    letter-spacing: -2px;
  }

  .logo-mark {
    grid-template-columns: repeat(3, 10px);
    gap: 4px;
    margin-top: 2px;
    margin-left: 2px;
  }

  .logo-mark i {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 760px) {
  .login-logo {
    justify-content: center;
    align-items: flex-start;
    margin: 0 auto 18px;
  }

  .logo-word {
    font-size: 40px;
  }

  .logo-mark {
    margin-top: 2px;
    margin-left: 2px;
  }
}


/* modal notices for disabled login methods */
.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 32, 48, .28);
  backdrop-filter: blur(4px);
}
.notice-modal.show {
  display: flex;
}
.notice-card {
  position: relative;
  width: min(390px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 28px 26px 24px;
  text-align: center;
  box-shadow: 0 18px 55px rgba(0,0,0,.18);
  animation: noticeIn .18s ease-out;
}
@keyframes noticeIn {
  from { transform: translateY(10px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.notice-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  color: #7b838e;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.notice-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(47,58,163,.10);
  color: var(--blue);
  font-size: 26px;
  font-weight: 800;
}
.notice-card.success .notice-icon {
  background: rgba(89,193,59,.14);
  color: var(--green);
}
.notice-card h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 22px;
}
.notice-card p {
  margin: 0 0 20px;
  color: #5f6670;
  font-size: 16px;
  line-height: 1.45;
}
.notice-ok {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 5px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
input.input-error {
  border-color: #d6403d !important;
  box-shadow: 0 0 0 3px rgba(214,64,61,.12);
}


/* loading animation before redirect */
.loading-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 32, 48, .30);
  backdrop-filter: blur(5px);
}
.loading-modal.show {
  display: flex;
}
.loading-card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 34px 30px 30px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.20);
  animation: noticeIn .18s ease-out;
}
.loader-ring {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 5px solid rgba(47,58,163,.12);
  border-top-color: var(--blue);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-card h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 24px;
}
.loading-card p {
  margin: 0 0 22px;
  color: #606872;
  line-height: 1.45;
  font-size: 15px;
}
.loading-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(47,58,163,.10);
}
.loading-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}
.loading-modal.show .loading-progress span {
  animation: progressFill var(--loading-time, 8s) linear forwards;
}
@keyframes progressFill {
  from { width: 0%; }
  to { width: 100%; }
}
