* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

body {
  background: #eef2f7;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.container {
  text-align: center;
  width: 100%;
  max-width: 380px;
  animation: fadeIn 0.8s ease-in-out;
}

.logo {
  width: 75px;
  height: 75px;
  background: linear-gradient(135deg, #2f56d3, #4c7cf0);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: white;
  font-size: 28px;
  box-shadow: 8px 8px 16px #d1d7e0,
              -8px -8px 16px #ffffff;
}

.title {
  color: #2f56d3;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  color: #7b8794;
  margin-bottom: 28px;
  font-size: 14px;
}

.card {
  background: #f4f7fb;
  padding: 30px;
  border-radius: 24px;
  box-shadow: 12px 12px 24px #d6dbe4,
              -12px -12px 24px #ffffff;
  text-align: left;
  transition: transform 0.3s;
}

.card.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

label {
  font-size: 12px;
  letter-spacing: 0.8px;
  color: #8895a7;
  margin-bottom: 6px;
  display: block;
  text-transform: uppercase;
  font-weight: 500;
}

.input-box {
  display: flex;
  align-items: center;
  background: #eef2f7;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: inset 5px 5px 10px #d6dbe4,
              inset -5px -5px 10px #ffffff;
  position: relative;
  transition: all 0.3s ease;
}

.input-box.focused {
  box-shadow: inset 6px 6px 12px #d6dbe4,
              inset -6px -6px 12px #ffffff,
              0 0 0 2px rgba(47, 86, 211, 0.2);
}

.input-box i {
  color: #8895a7;
  margin-right: 12px;
  font-size: 15px;
  transition: color 0.3s;
}

.input-box.focused i {
  color: #2f56d3;
}

.input-box input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: #2c3e50;
}

.input-box input::placeholder {
  color: #a8b5c4;
}

.toggle-password {
  cursor: pointer;
  margin-left: auto;
  transition: color 0.3s;
  padding: 4px;
}

.toggle-password:hover {
  color: #2f56d3;
}

.password-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.forgot-link {
  font-size: 12px;
  color: #2f56d3;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
}

.forgot-link:hover {
  opacity: 0.7;
}

.remember-row {
  margin-bottom: 20px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  padding-left: 28px;
  user-select: none;
}

.remember input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  width: 20px;
  background: #eef2f7;
  border-radius: 6px;
  box-shadow: inset 3px 3px 6px #d6dbe4,
              inset -3px -3px 6px #ffffff;
  transition: all 0.3s;
}

.remember:hover .checkmark {
  box-shadow: inset 4px 4px 8px #d6dbe4,
              inset -4px -4px 8px #ffffff;
}

.remember input:checked ~ .checkmark {
  background: linear-gradient(135deg, #2f56d3, #4c7cf0);
  box-shadow: 3px 3px 6px #cfd6e3,
              -3px -3px 6px #ffffff;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.remember input:checked ~ .checkmark:after {
  display: block;
}

.remember span:last-child {
  font-size: 13px;
  color: #7b8794;
}

.error-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff0f0;
  color: #e74c3c;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s;
  pointer-events: none;
}

.error-msg.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.error-msg i {
  font-size: 16px;
}

.success-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fff4;
  color: #27ae60;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s;
  pointer-events: none;
}

.success-msg.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.success-msg i {
  font-size: 16px;
}

.btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #2f56d3, #4c7cf0);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 8px 8px 16px #cfd6e3,
              -8px -8px 16px #ffffff;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 10px 10px 20px #cfd6e3,
              -10px -10px 20px #ffffff;
}

.btn:active {
  transform: translateY(0);
}

.btn.loading .btn-text {
  opacity: 0;
}

.btn.loading .btn-loader {
  opacity: 1;
}

.btn-text {
  transition: opacity 0.3s;
}

.btn-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.3s;
}

.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #dce3ec, transparent);
}

.divider span {
  padding: 0 16px;
  font-size: 12px;
  color: #a8b5c4;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.social-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.social-btn {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: #f4f7fb;
  box-shadow: 6px 6px 12px #d6dbe4,
              -6px -6px 12px #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a6a7a;
  font-size: 18px;
  transition: all 0.3s ease;
}

.social-btn:hover {
  transform: translateY(-3px);
  box-shadow: 8px 8px 16px #d6dbe4,
              -8px -8px 16px #ffffff;
  color: #2f56d3;
}

.social-btn:active {
  transform: translateY(0);
  box-shadow: inset 4px 4px 8px #d6dbe4,
              inset -4px -4px 8px #ffffff;
}

.signup {
  text-align: center;
  font-size: 14px;
  color: #7b8794;
}

.signup a {
  color: #2f56d3;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s;
}

.signup a:hover {
  opacity: 0.7;
}

.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 12px;
  color: #a8b5c4;
}

.security-badge i {
  color: #27ae60;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .container {
    max-width: 100%;
  }

  .card {
    padding: 24px;
    border-radius: 20px;
  }

  .logo {
    width: 65px;
    height: 65px;
    font-size: 24px;
  }

  .title {
    font-size: 22px;
  }
}