@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, input, button, label {
  font-family: 'Poppins', sans-serif;
}

body {
  background: #f8f9fc;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* ================= LOGIN CARD ================= */
.login-container {
  background: #fff;
  width: 100%;
  max-width: 380px;
  padding: 1.8rem;
  padding-top: 70px;
  text-align: center;
  border-radius: 1.3rem;
  position: relative;
  box-shadow: 0px 10px 35px rgba(0, 0, 0, 0.20);
}

/* Profile Circle */
.profile-circle {
  width: 110px;
  height: 110px;
  background: #0c2340;
  border-radius: 50%;
  position: absolute;
  top: -55px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 8px 15px rgba(0,0,0,0.25);
}

.profile-circle i {
  font-size: 50px;
  color: white;
}

/* Title */
.login-container h2 {
  font-weight: 600;
  margin-bottom: 15px;
}

/* Floating Label Input */
.input-group {
  position: relative;
  margin-bottom: 18px;
}

.input-group input {
  width: 100%;
  padding: 0.9rem 2.8rem 0.9rem 2.8rem;
  border: 1px solid #ccc;
  border-radius: 0.7rem;
  font-size: 0.9rem;
  background: #fff;
}

.input-group i {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  color: #0c2340;
  font-size: 1rem;
}

.input-group label {
  position: absolute;
  left: 2.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  padding: 0 4px;
  color: #777;
  pointer-events: none;
  transition: 0.25s ease;
  font-size: 0.9rem;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
  top: 1px;
  font-size: 0.7rem;
  color: #6a0dad;
  font-weight: 600;
}

.toggle-password {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #777;
}

.login-options {
  display: flex;
  font-size: 0.8rem;
  margin-top: -5px;
  margin-bottom: 10px;
  justify-content: flex-end; 
}

.login-options a {
  color: #6f05ac;
  text-decoration: none;
}

.login-options a:hover {
  text-decoration: underline;
}

/* Login Button */
button {
  width: 100%;
  padding: 0.9rem;
  background: #092d63;
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 10px;
}

button:hover {
  background: #092994;
}

/* Error + Success Msg */
.msg {
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.msg.error {
  background: #ffd2d2;
  color: #b10000;
}

.msg.success {
  background: #d7ffd7;
  color: #0f7a0f;
}


/* ======= FORGOT PASSWORD ======= */
.exit-icon {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  color: #e74c3c;
  text-decoration: none;
  background: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}
.exit-icon:hover {
  background: #e74c3c;
  color: #fff;
  transform: scale(1.1);
}

.password-wrapper {
  position: relative;
}
.password-wrapper i {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
}
p {
  margin-top: 10px;
  font-size: 14px;
}
p a {
  color: #113b96;
  text-decoration: none;
}
p a:hover {
  text-decoration: underline;
}

/* ======== PROFILE ======= */
.profile-container {
  width: 500px;
  margin: 40px auto;
  padding: 35px 30px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  position: relative;
  text-align: center;
}

.profile-container h2 {
  color: #113b96;
  margin-bottom: 25px;
  font-size: 22px;
  font-weight: 600;
}

.image-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 25px;
}

.profile-image-preview {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #113b96;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: block;
  margin: 0 auto;
}

.profile-image-preview:hover {
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: rgba(0, 0, 0, 0.5);
  border-bottom-left-radius: 50% 100%;
  border-bottom-right-radius: 50% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-wrapper:hover .overlay {
  opacity: 1;
}

.camera-icon {
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.profile-info {
  text-align: left;
  margin-top: -20px;
  padding: 20px;
  border-radius: 10px;
  background: #f8f9fc;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

.profile-info p {
  margin: 10px 0;
  font-size: 15px;
  color: #444;
}

.profile-info strong {
  color: #113b96;
}

.form-group {
  position: relative;
  margin-bottom: 25px;
  text-align: left;
}

.form-group input {
  width: 100%;
  padding: 12px 12px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  outline: none;
  transition: border 0.3s ease;
}

.form-group input:focus {
  border: 1px solid #3912e9;
}

.form-group label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
  transition: 0.3s ease;
  background: #fff;
  padding: 0 4px;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
  top: -2px;
  transform: translateY(-30%);
  font-size: 0.7rem;
  color: #6a0dad;
  font-weight: 600;
}
.btn-group {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.btn-group .btn-save {
  flex: 1;
  margin: 0;
}
.btn-save {
  background-color: #113b96;
  color: white;
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  margin: 15px auto 0;
  width: 60%;
  transition: background 0.3s ease;
}

.btn-save:hover {
  background-color: #5168b6;
}
.alert {
  padding: 12px 16px;
  margin: 10px 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  animation: fadeIn 0.4s ease-in-out;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.alert.success {
  background: #d4edda;
  color: #155724;
  border-left: 5px solid #28a745;
}

.alert.error {
  background: #f8d7da;
  color: #721c24;
  border-left: 5px solid #dc3545;
}

.alert.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-5px);}
  to {opacity: 1; transform: translateY(0);}
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #e74c3c;
  color: #fff;
  border: none;
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.3s ease;
}

.close-btn:hover {
  background: #c0392b;
}

.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  position: relative;
  background: #fff;
  padding: 30px;
  border-radius: 14px;
  width: 420px;
  max-width: 90%;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  animation: fadeIn 0.3s ease;
}

.modal-content h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #113b96;
  font-size: 20px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
  color: #555;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #c0392b;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-15px); }
  to   { opacity: 1; transform: translateY(0); }
}


@media (max-width: 480px) {

  body {
    padding: 0;
    align-items: flex-start;  /* Move card higher */
  }

  .login-container {
    width: 100%;
    max-width: 100%;
    margin: 0 10px;
    margin-top: 120px; /* Adjust container height on screen */
    padding: 2.5rem 1.8rem;
    padding-top: 95px;
    border-radius: 1.3rem;
  }

  .profile-circle {
    width: 120px;
    height: 120px;
    top: -60px;
  }

  .profile-circle i {
    font-size: 55px;
  }

  .input-group input {
    padding: 1.1rem 2.8rem 1.1rem 2.8rem;
    font-size: 1.05rem;
  }

  button {
    font-size: 1.1rem;
    padding: 1rem;
  }
}