html,
body {
  margin: 0;
  min-height: 100%;
  background: #f6f6f6;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Poppins', sans-serif;
  color: #342482;
}

.login-shell {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(148, 180, 222, 0.24), transparent 34%),
    radial-gradient(circle at bottom right, rgba(242, 168, 18, 0.12), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f6f6f6 48%, #eef3fb 100%);
}

.login-shell::before,
.login-shell::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-shell::before {
  background-image:
    linear-gradient(rgba(52, 36, 130, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 36, 130, 0.04) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
}

.login-shell::after {
  background:
    radial-gradient(circle at 15% 50%, rgba(148, 180, 222, 0.18), transparent 0, transparent 24%),
    radial-gradient(circle at 85% 50%, rgba(52, 36, 130, 0.08), transparent 0, transparent 25%);
}

.login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-bg-mobile {
  display: none;
}

.login-circuit {
  position: absolute;
  top: 50%;
  width: clamp(200px, 28vw, 420px);
  height: 340px;
  transform: translateY(-50%);
  opacity: 0.9;
}

.login-circuit::before,
.login-circuit::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(52, 36, 130, 0.12);
}

.login-circuit::before {
  inset: 12px 32px 12px 0;
  clip-path: polygon(0 16%, 84% 16%, 100% 32%, 100% 68%, 84% 84%, 0 84%, 0 100%, 100% 100%, 100% 0, 0 0);
}

.login-circuit::after {
  top: 50%;
  width: calc(100% - 72px);
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, rgba(52, 36, 130, 0.22), rgba(52, 36, 130, 0.06));
}

.login-circuit-left {
  left: -32px;
}

.login-circuit-right {
  right: -32px;
  transform: translateY(-50%) scaleX(-1);
}

.login-chip {
  position: absolute;
  top: 50%;
  width: 84px;
  height: 44px;
  border: 1px solid rgba(52, 36, 130, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 24px rgba(52, 36, 130, 0.08);
  transform: translateY(-50%);
}

.login-chip::before,
.login-chip::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.login-chip::before {
  width: 36px;
  height: 1px;
  background: rgba(52, 36, 130, 0.18);
}

.login-chip::after {
  right: 14px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(242, 168, 18, 0.9) 0%, rgba(242, 168, 18, 0.25) 32%, transparent 72%);
}

.login-chip-left {
  left: 52px;
}

.login-chip-left::before {
  right: calc(100% + 12px);
}

.login-chip-right {
  right: 52px;
}

.login-chip-right::before {
  left: calc(100% + 12px);
}

.login-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 32px 20px;
}

.login-card {
  position: relative;
  width: min(100%, 430px);
  padding: 30px 28px 28px;
  border: 1px solid rgba(52, 36, 130, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 70px rgba(52, 36, 130, 0.14);
  backdrop-filter: blur(14px);
}

.login-card::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(148, 180, 222, 0.22);
  border-radius: 20px;
  pointer-events: none;
}

.login-card-header,
.login-card-body {
  position: relative;
  z-index: 1;
}

.login-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-bottom: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(226, 236, 251, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 32px rgba(52, 36, 130, 0.14);
}

.login-brand img {
  width: 50px;
  height: auto;
}

.login-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.35rem);
  line-height: 1.05;
  font-weight: 700;
  color: #342482;
}

.login-subtitle {
  margin: 10px auto 0;
  max-width: 300px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #667085;
}

.input-group-modern {
  display: grid;
  gap: 16px;
}

.group {
  position: relative;
}

.input-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #342482;
}

.input-shell {
  position: relative;
}

.input-group-modern input {
  width: 100%;
  height: 56px;
  border: 1px solid rgba(52, 36, 130, 0.12);
  border-radius: 16px;
  background: rgba(246, 248, 252, 0.95);
  padding: 0 18px;
  font-size: 0.98rem;
  color: #1f2937;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  box-sizing: border-box;
}

.input-group-modern input::placeholder {
  color: #98a2b3;
}

.input-group-modern input:focus {
  outline: none;
  border-color: rgba(52, 36, 130, 0.38);
  background: #ffffff;
  box-shadow: 0 0 0 5px rgba(148, 180, 222, 0.3);
}

.password-wrapper {
  position: relative;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8c94a7;
  transform: translateY(-50%);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.password-toggle-btn:hover {
  color: #342482;
  background: rgba(148, 180, 222, 0.22);
}

#loginButton.btn-modern {
  width: 100%;
  min-height: 56px;
  margin-top: 24px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f2a812 0%, #f4bb3b 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 30px rgba(242, 168, 18, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

#loginButton.btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 38px rgba(242, 168, 18, 0.28);
}

#loginButton.btn-modern:focus {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.9),
    0 0 0 8px rgba(242, 168, 18, 0.24);
}

.register-link-container {
  margin-top: 18px;
  text-align: center;
  font-size: 0.95rem;
  color: #667085;
}

.register-link {
  color: #342482;
  font-weight: 600;
  text-decoration: none;
}

.register-link:hover {
  text-decoration: underline;
}

@media (max-width: 1023.98px) {
  .login-shell {
    background: #f6f6f6;
  }

  .login-shell::before,
  .login-shell::after,
  .login-circuit,
  .login-chip {
    display: none;
  }

  .login-bg-mobile {
    display: block;
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center;
  }

  .login-content {
    display: block;
    padding: 0;
  }

  .login-card {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 44px 32px 36px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .login-card::before {
    display: none;
  }

  .login-card-header {
    padding-top: 36px;
    text-align: left;
  }

  .login-brand {
    width: auto;
    height: auto;
    margin-bottom: 18px;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .login-brand img {
    width: auto;
    height: 36px;
  }

  .login-title {
    font-size: 2rem;
    color: #ffffff;
  }

  .login-subtitle {
    margin: 10px 0 0;
    max-width: none;
    color: rgba(255, 255, 255, 0.92);
  }

  .login-card-body {
    margin-top: 56px;
    padding: 0;
  }

  .input-label {
    color: #342482;
  }

  .input-group-modern input {
    border-color: transparent;
    background: #ededed;
    box-shadow: none;
  }

  .input-group-modern input:focus {
    border-color: rgba(52, 36, 130, 0.2);
    box-shadow: 0 0 0 4px rgba(148, 180, 222, 0.2);
  }

  #loginButton.btn-modern {
    margin-top: 28px;
  }
}

@media (max-width: 639.98px) {
  .login-card {
    padding: 36px 24px 28px;
  }

  .login-card-header {
    padding-top: 20px;
  }

  .login-card-body {
    margin-top: 48px;
  }

  .login-title {
    font-size: 1.85rem;
  }

  .login-subtitle {
    font-size: 0.92rem;
  }
}

@media (min-width: 1024px) {
  .login-content {
    padding: 48px 32px;
  }

  .login-card {
    margin: 0 auto;
  }
}
