@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --primary-color: #4e73df;
  --primary-hover: #2e59d9;
  --secondary-color: #858796;
  --success-color: #1cc88a;
  --danger-color: #e74a3b;
  --warning-color: #f6c23e;
  --card-bg: #fff;
  --body-bg: #f8f9fc;
  --text-color: #5a5c69;
  --shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
  --input-bg: #f8f9fc;
  --input-border: #d1d3e2;
  --glass-effect: rgba(255, 255, 255, 0.9);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: var(--body-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: var(--text-color);
  background-image: linear-gradient(
    135deg,
    rgba(78, 115, 223, 0.05) 0%,
    rgba(78, 115, 223, 0.1) 100%
  );
  background-size: cover;
  position: relative;
  overflow: hidden;
}

/* Background animated shapes */
body::before,
body::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  z-index: -1;
  /* filter: blur(80px); */
  opacity: 0.8;
}

body::before {
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--success-color)
  );
  top: -100px;
  left: -100px;
  animation: float 12s ease-in-out infinite;
}

body::after {
  background: linear-gradient(45deg, var(--warning-color), var(--danger-color));
  bottom: -100px;
  right: -100px;
  animation: float 12s ease-in-out infinite reverse;
}

@keyframes float {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(50px, 50px) rotate(180deg);
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
  }
}

.login-container {
  width: 100%;
  max-width: 450px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--glass-effect);
  border-radius: 15px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  padding: 30px;
  transform: translateY(20px);
  animation: fadeIn 0.5s ease forwards;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.logo img {
  max-height: 60px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.login-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Card switch for user type */
.card-switch {
  display: flex;
  justify-content: center;
  position: relative;
  background-color: var(--input-bg);
  border-radius: 30px;
  margin-bottom: 30px;
  height: 60px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-switch input[type="radio"] {
  display: none;
}

.slide-item {
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  flex-direction: column;
  padding: 10px 0;
  /* color: var(--secondary-color); */
  color: white;
}

.slide-item .icon {
  margin-bottom: 5px;
  font-size: 18px;
  transition: all 0.3s ease;
}

.slider-tab {
  position: absolute;
  height: calc(100% - 10px);
  width: calc(50% - 10px);
  left: 5px;
  top: 5px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--primary-hover)
  );
  border-radius: 25px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 0;
  box-shadow: 0 2px 10px rgba(78, 115, 223, 0.4);
}

#executive:checked ~ .slider-tab {
  left: 5px;
}

#manager:checked ~ .slider-tab {
  left: calc(50% + 5px);
}

input[type="radio"]:checked + .slide-item {
  color: var(--secondary-color);
}

input[type="radio"]:checked + .slide-item .icon {
  transform: scale(1.2);
}

/* Form styling */
.form-group {
  margin-bottom: 25px;
  position: relative;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.input-icon {
  position: absolute;
  left: 15px;
  color: var(--secondary-color);
  transition: all 0.3s ease;
  z-index: 2;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 15px 45px;
  border: 1px solid var(--input-border);
  border-radius: 30px;
  background-color: var(--input-bg);
  font-size: 16px;
  transition: all 0.3s ease;
  color: var(--text-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
  outline: none;
  transform: translateY(-2px);
}

input[type="text"]:focus + .input-icon,
input[type="password"]:focus + .input-icon {
  color: var(--primary-color);
  transform: scale(1.2);
}

.toggle-password {
  position: absolute;
  right: 15px;
  cursor: pointer;
  color: var(--secondary-color);
  transition: all 0.3s ease;
  z-index: 2;
}

.toggle-password:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.remember-me {
  display: flex;
  align-items: center;
}

.remember-me input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.remember-me label {
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.remember-me label:hover {
  color: var(--primary-color);
}

.forgot-password {
  font-size: 14px;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.forgot-password:hover {
  text-decoration: none;
}

.forgot-password::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.forgot-password:hover::after {
  width: 100%;
}

.login-button {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--primary-hover)
  );
  color: white;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(78, 115, 223, 0.4);
  position: relative;
  overflow: hidden;
}

.login-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(78, 115, 223, 0.6);
}

.login-button:active {
  transform: translateY(0);
}

.login-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.login-button:hover::before {
  left: 100%;
}

.button-text {
  margin-right: 10px;
  transition: all 0.3s ease;
}

.button-icon {
  transition: all 0.3s ease;
}

.login-button:hover .button-icon {
  transform: translateX(5px);
}

.login-footer {
  text-align: center;
  margin-top: 30px;
  font-size: 14px;
  color: var(--secondary-color);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.login-footer:hover {
  opacity: 1;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Alert styling */
.alert {
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  position: relative;
  padding-right: 35px;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.alert:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.alert-success {
  background-color: rgba(28, 200, 138, 0.1);
  border-left: 4px solid var(--success-color);
  color: var(--success-color);
}

.alert-danger {
  background-color: rgba(231, 74, 59, 0.1);
  border-left: 4px solid var(--danger-color);
  color: var(--danger-color);
}

.alert-warning {
  background-color: rgba(246, 194, 62, 0.1);
  border-left: 4px solid var(--warning-color);
  color: var(--warning-color);
}

.close-alert {
  position: absolute;
  right: 10px;
  top: 10px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: inherit;
  transition: all 0.3s ease;
}

.close-alert:hover {
  transform: scale(1.2);
  color: var(--danger-color);
}

/* Responsive styles */
@media (max-width: 576px) {
  .login-container {
    padding: 15px;
  }

  .login-card {
    padding: 20px;
  }

  .slide-item {
    font-size: 12px;
    padding: 8px 0;
  }

  .login-header h1 {
    font-size: 20px;
  }

  input[type="text"],
  input[type="password"] {
    padding: 12px 45px;
    font-size: 14px;
  }

  .login-button {
    padding: 12px;
    font-size: 15px;
  }

  .card-switch {
    height: 50px;
  }
}
