/* Base styles from login.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background: url("../Management/image/background.jpg") center / cover fixed no-repeat;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.container {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  padding: 40px 30px;
  text-align: center;
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s ease;
}

.container.fade-in {
  transform: translateY(0);
  opacity: 1;
}

.logo {
  width: 100px;
  height: auto;
  display: block;
  margin: 0 auto 15px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.head {
  margin-bottom: 30px;
}

.head h1 {
  font-size: 28px;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.head p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  margin-bottom: 10px;
}

/* Form elements */
form h1 {
  font-size: 28px;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

form h3 {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  margin-bottom: 20px;
  font-weight: 400;
}

.inputbox {
  margin: 20px 0;
}

.input-icon {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  transition: all 0.3s ease;
}

.input-icon:focus-within {
  border-color: #4169e1;
  box-shadow: 0 0 0 2px rgba(65, 105, 225, 0.3);
  background: rgba(255, 255, 255, 0.25);
}

.input-icon i {
  padding: 0 15px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
}

.input-icon .toggle-password {
  cursor: pointer;
  padding-right: 15px;
}

.input-icon input {
  width: 100%;
  padding: 15px 0;
  border: none;
  outline: none;
  background: transparent;
  color: #ffffff;
  font-size: 15px;
}

/* Standard input styling for non-icon inputs */
.inputbox input {
  width: 100%;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 15px;
  transition: all 0.3s ease;
  outline: none;
}

.inputbox input:focus {
  border-color: #4169e1;
  box-shadow: 0 0 0 2px rgba(65, 105, 225, 0.3);
  background: rgba(255, 255, 255, 0.25);
}

.inputbox input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 25px 0;
}

.remember-me {
  display: flex;
  align-items: center;
}

.remember-me input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  margin-right: 8px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.remember-me input[type="checkbox"]:checked {
  background: #4169e1;
  border-color: #4169e1;
}

.remember-me input[type="checkbox"]:checked::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
}

.remember-me label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  cursor: pointer;
}

.forgot {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  transition: 0.3s;
}

.forgot:hover {
  color: #4169e1;
  text-decoration: underline;
}

/* Button styles */
.button-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 25px 0;
}

.login-button,
button[type="submit"] {
  background: #4169e1;
  color: #fff;
  width: 100%;
  border-radius: 12px;
  font-size: 16px;
  padding: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.login-button::before,
button[type="submit"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.login-button:hover,
button[type="submit"]:hover {
  background: #3a5fcd;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(65, 105, 225, 0.4);
}

.login-button:hover::before,
button[type="submit"]:hover::before {
  left: 100%;
}

.login-button:active,
button[type="submit"]:active {
  transform: translateY(0);
}

.cancel-button {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 100%;
  border-radius: 12px;
  font-size: 16px;
  padding: 15px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.cancel-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;
}

.cancel-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cancel-button:hover::before {
  left: 100%;
}

.cancel-button:active {
  transform: translateY(0);
}

.footer-text {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

/* OTP specific styles from otp.css */
.otp-container {
  margin: 25px 0;
}

.otp-inputs {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 20px;
}

.otp-input {
  width: 45px;
  height: 50px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #ffffff;
  transition: all 0.3s ease;
}

.otp-input:focus {
  border-color: #4169e1;
  box-shadow: 0 0 0 2px rgba(65, 105, 225, 0.3);
  background: rgba(255, 255, 255, 0.25);
  outline: none;
}

.timer-container {
  text-align: center;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

#timer {
  font-weight: 600;
  color: #ffffff;
}

.timer-container.expired #timer {
  color: #ff4d4d;
}

.resend-container {
  text-align: center;
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.resend-button {
  background: none;
  border: none;
  color: #4169e1;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  font-size: 14px;
  text-decoration: underline;
}

.resend-button:hover {
  color: #3a5fcd;
}

.error-message {
  background-color: rgba(255, 77, 77, 0.2);
  border-left: 3px solid #ff4d4d;
  color: #ffffff;
  padding: 10px 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-size: 14px;
}

.success-message {
  background-color: rgba(77, 255, 77, 0.2);
  border-left: 3px solid #4dff4d;
  color: #ffffff;
  padding: 10px 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-size: 14px;
}

/* Link styling for forgot password pages */
form p {
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

/* Responsive styles */
@media (max-width: 768px) {
  .container {
    width: 85%;
    padding: 30px 25px;
  }
}

@media (max-width: 480px) {
  .container {
    width: 90%;
    padding: 25px 20px;
    border-radius: 15px;
  }

  .head h1,
  form h1 {
    font-size: 24px;
  }

  .head p,
  form h3 {
    font-size: 14px;
  }

  .input-icon input,
  .inputbox input {
    padding: 12px 0;
  }

  .options {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .login-button,
  button[type="submit"],
  .cancel-button {
    padding: 12px;
  }

  .otp-input {
    width: 40px;
    height: 45px;
    font-size: 20px;
  }

  .otp-inputs {
    gap: 5px;
  }
}
