/* =========================
   Login Page
   ========================= */

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: #090916;
  color: white;
  padding: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../images/btz-pattern-white.png");
  background-repeat: repeat;
  background-size: 168px auto;
  background-position: -4px 6px;
  opacity: 0.045;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(16, 244, 139, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(9, 9, 22, 0.08), rgba(9, 9, 22, 0.72));
}

body > * {
  position: relative;
  z-index: 1;
}

/* Top Bar */
.login-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #13132c;
  backdrop-filter: blur(12px);
}

.login-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-self: start;
  text-decoration: none;
}

.login-header-logo {
  width: 166px;
  height: 44px;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.login-header-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-self: end;
}

.language-menu {
  position: relative;
}

.language-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #2b2a50;
  border-radius: 8px;
  background: #0b0a1d;
  color: #ffffff;
  cursor: pointer;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  border-color: rgba(16, 244, 139, 0.72);
  outline: none;
}

svg-icon {
  display: inline-grid;
  place-items: center;
  width: 1em;
  height: 1em;
  color: currentColor;
  line-height: 0;
}

svg-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.language-toggle-icon {
  width: 22px;
  height: 22px;
  color: #ffffff;
}

.language-current {
  min-width: 22px;
  color: #10f48b;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.language-chevron {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
  transition: transform 150ms ease;
}

.language-chevron svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.language-menu.is-open .language-chevron {
  transform: rotate(180deg);
}

.language-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 118px;
  display: none;
  gap: 4px;
  padding: 6px;
  border: 1px solid #2b2a50;
  border-radius: 8px;
  background: #0b0a1d;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.language-menu.is-open .language-list {
  display: grid;
}

.language-option {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.language-option:hover,
.language-option:focus-visible,
.language-option.active {
  background: rgba(16, 244, 139, 0.14);
  color: #10f48b;
  outline: none;
}

.login-main {
  width: 100%;
  min-height: calc(100vh - 68px);
  padding: 48px 30px 96px;
}

/* Logo */
.logo-box {
  text-align: center;
  margin-bottom: 28px;
}

.logo {
  width: 210px;
  height: 210px;
  border-radius: 100%;
  object-fit: cover;
}

/* Login Card */
.login-card {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: rgba(19, 19, 44, 0.84);
  padding: 35px 25px;
  border: 1px solid rgba(45, 45, 83, 0.95);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
}

.login-card h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 26px;
}

/* Input */
.input-box {
  width: 100%;
  height: 48px;
  border: 2px solid #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  margin-bottom: 22px;
  background: rgba(19, 19, 44, 0.95);
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input-box:focus-within {
  border-color: #10f48b;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 0 3px rgba(16, 244, 139, 0.14);
}

.input-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 20px;
}

.input-icon > svg,
.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-icon {
  color: #ffffff;
}

.lock-icon {
  color: #ffffff;
}

.input-box input {
  min-width: 0;
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 16px;
}

.password-toggle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0;
}

.password-toggle:hover {
  color: #ffffff;
}

.password-toggle .eye-off {
  display: none;
}

.password-toggle.is-visible .eye-open {
  display: none;
}

.password-toggle.is-visible .eye-off {
  display: block;
}

.input-box input::placeholder {
  color: white;
  font-weight: 400;
}

/* Login Button */
#loginBtn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 7px;
  background: #10f48b;
  color: #1b1a18;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

#loginBtn:hover {
  background: #00ce80;
}

/* Result */
#result {
  text-align: center;
  margin-top: 15px;
  font-weight: 500;
}

/* Bottom Register Link */
.bottom-link {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.bottom-link span {
  width: 120px;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.bottom-link p {
  font-size: 14px;
  font-weight: 400;
}

.bottom-link a {
  color: #00c853;
  text-decoration: none;
}

.login-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(9, 9, 22, 0.96);
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.login-footer p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-footer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex: 0 0 auto;
}

.login-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
}

.login-footer-link:hover,
.login-footer-link:focus-visible {
  color: #10f48b;
  outline: none;
}

.login-footer-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-page .bitazza-support-widget:not(.is-open) {
  display: none;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 480px) {
  .login-header {
    height: 64px;
    padding: 0 16px;
    gap: 12px;
  }

  .login-header-logo {
    width: 144px;
    height: 40px;
  }

  .language-toggle {
    min-height: 38px;
    padding: 0 10px;
  }

  .language-toggle-icon {
    width: 20px;
    height: 20px;
  }

  .login-main {
    min-height: calc(100vh - 64px);
    padding: 38px 22px 104px;
  }

  .logo {
    width: 150px;
    height: 150px;
  }

  .login-card {
    padding: 30px 22px;
  }

  .bottom-link span {
    width: 70px;
  }

  .login-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 7px 12px;
  }

  .login-footer-actions {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }
}
