/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* background: linear-gradient(135deg, #0a0a23 0%, #101035 100%); */
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%;
}

/* Touch-friendly improvements */
input, button {
  -webkit-appearance: none;
  -webkit-border-radius: 0;
}

/* === NAVIGATION === */
.navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgb(255, 255, 255);
  max-height: 70px;
  /* backdrop-filter: blur(6px); */
}

.kaizensLogo-div,
.kaitestLogo2-div {
  display: flex;
  align-items: center;
}

.kaizensLogo,
.kaitestLogo {
  height: auto;
  width: 100px;
  object-fit: contain;
}

/* === MAIN SECTION === */
.mainDiv {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0rem 2rem 0rem 2rem;
  /* position: absolute; */
  background: linear-gradient(135deg, #4c1d95, #1e1b4b 50%, #1e3a8a);
  /* clip-path: path("M 0 0 L 1200 0 L 1200 400 Q 600 480 0 400 Z"); */
  /* height: 300px; */
  border-bottom-left-radius: 80% 10%;
  border-bottom-right-radius: 80% 10%;
  margin-bottom: 30px;
}

/* === HERO SECTION === */
.heroSection {
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: center;
  align-items: center;
  /* max-width: 420px; */
  width: 100%;
  /* background-color: rgba(255, 255, 255, 0.05); */
  /* border-radius: 16px; */
  padding: 2.5rem;
  /* box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); */
}

.center-text {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.paragraph-text {
  font-size: 0.8rem;
  opacity: 0.8;
  padding-bottom: 2rem;
  margin-bottom: 3rem;
}

/* === FORM === */
.form-wrapper {
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  /* box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); */
  /* background-color: rgba(255, 255, 255, 0.05); */
  border: 1px solid rgba(255, 255, 255, 0.616);
  border-radius: 16px;
  margin-bottom: 3rem;
}

.sign-in-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sign-in-form h3 {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.sign-in-form p {
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 1rem;
}

.sign-in-form input {
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.6);
  padding: 0.8rem 0;
  font-size: 1rem;
  color: white;
  outline: none;
  transition: border-color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  -webkit-border-radius: 0;
}

.sign-in-form input:focus {
  border-bottom-color: rgba(255, 255, 255, 1);
}

.sign-in-form input[type="password"]::-ms-reveal,
.sign-in-form input[type="password"]::-ms-clear {
  display: none;
}

.sign-in-form input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none;
}

.sign-in-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.password-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-container input {
  flex: 1;
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease;
  font-size: 1rem;
  padding: 8px;
  margin: -8px -4px -8px -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  -webkit-user-select: none;
  user-select: none;
}

.toggle-password:hover {
  color: rgba(255, 255, 255, 0.9);
}

.sign-in-form button {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: none;
  background: #7f52c2;
  border: 2px solid #7f52c2;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  -webkit-appearance: none;
  -webkit-border-radius: 8px;
  min-height: 44px;
  margin-top: 25px;
}

.sign-in-form button:hover,
.sign-in-form button:active {
  background-color: #9b59b6;
}

/* === MESSAGES === */
.Msg {
  text-align: center;
  margin-top: 0.5rem;
}

.loggingMsg {
  color: #ccc;
  font-size: 0.9rem;
  display: none;
}

.errorCloseBtn {
  margin-right: 10px;
  cursor: pointer;
  /* font-weight: bold; */
  color: #ff6b6b;
}

.error-message-container {
  display: flex;
  /* justify-content: center; */
  align-items: center;
  margin-top: 0.4rem;
}

.errorMsg {
  color: #ff6b6b;
  font-size: 0.9rem;
  width: 100%;
  /* margin-top: 0.4rem; */
}

/* === FOOTER TEXT === */
.text-KaiBridge {
  background: #fff;
  border-top: 1px solid #eee;
  text-align: right;
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-right: 20px;
  font-size: 0.9rem;
  color: #796C93;
}

/* === RESPONSIVE BREAKPOINTS === */

/* Desktops */
@media (max-width: 1280px) {
  .navigation {
    padding: 1rem 2rem;
  }

  .kaizensLogo,
  .kaitestLogo {
    height: 50px;
  }

  .heroSection {
    padding: 3rem 2rem;
  }

  .center-text {
    font-size: 2.8rem;
  }

  .paragraph-text {
    margin-bottom: 2rem;
  }
}

/* Laptops */
@media (max-width: 1024px) {
  .navigation {
    padding: 1rem 1.5rem;
  }

  .kaizensLogo,
  .kaitestLogo {
    height: 45px;
  }

  .heroSection {
    padding: 2.5rem 2rem;
  }

  .center-text {
    font-size: 2.5rem;
  }

  .paragraph-text {
    margin-bottom: 2rem;
  }
}

/* Small Laptops/Large Tablets */
@media (max-width: 900px) {
  .navigation {
    padding: 0.8rem 1.5rem;
  }

  .kaizensLogo,
  .kaitestLogo {
    height: 40px;
  }

  .heroSection {
    padding: 2rem 1.5rem;
  }

  .center-text {
    font-size: 2rem;
  }

  .paragraph-text {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }

  .form-wrapper {
    max-width: 380px;
    padding: 1.5rem;
  }
}

/* Tablets */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .navigation {
    padding: 0.75rem 1rem;
    max-height: 65px;
  }

  .kaizensLogo,
  .kaitestLogo {
    height: 35px;
  }

  .mainDiv {
    padding: 0 1rem;
    margin-bottom: 20px;
  }

  .heroSection {
    padding: 1.5rem 1rem;
  }

  .center-text {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .paragraph-text {
    font-size: 0.8rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
  }

  .form-wrapper {
    max-width: 90%;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .sign-in-form h3 {
    font-size: 1.2rem;
  }

  .sign-in-form p {
    font-size: 0.85rem;
  }

  .sign-in-form input {
    padding: 0.7rem 0;
    font-size: 0.95rem;
  }

  .sign-in-form button {
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }

  .text-KaiBridge {
    font-size: 0.85rem;
    padding: 0.8rem 15px;
  }
}

/* Small Tablets/Large Mobile */
@media (max-width: 600px) {
  .navigation {
    flex-direction: row;
    padding: 0.6rem 0.8rem;
    gap: 0.5rem;
    justify-content: space-around;
  }

  .kaizensLogo-div,
  .kaitestLogo2-div {
    flex: 1;
    justify-content: center;
  }

  .kaizensLogo,
  .kaitestLogo {
    height: 30px;
  }

  .mainDiv {
    padding: 0 0.8rem;
    margin-bottom: 15px;
    border-bottom-left-radius: 70% 15%;
    border-bottom-right-radius: 70% 15%;
  }

  .heroSection {
    padding: 1.25rem 0.8rem;
  }

  .center-text {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
  }

  .paragraph-text {
    font-size: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
  }

  .form-wrapper {
    max-width: 95%;
    padding: 1rem;
    margin-bottom: 1.2rem;
  }

  .sign-in-form {
    gap: 0.8rem;
  }

  .sign-in-form h3 {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
  }

  .sign-in-form p {
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
  }

  .sign-in-form input {
    padding: 0.6rem 0;
    font-size: 0.9rem;
  }

  .sign-in-form button {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }

  .toggle-password {
    font-size: 0.9rem;
  }

  .text-KaiBridge {
    font-size: 0.8rem;
    padding: 0.6rem 10px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .navigation {
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem;
  }

  .kaizensLogo-div,
  .kaitestLogo2-div {
    width: 100%;
  }

  .kaizensLogo,
  .kaitestLogo {
    height: 28px;
    max-width: 90px;
  }

  .mainDiv {
    padding: 0 0.5rem;
    margin-bottom: 10px;
    border-bottom-left-radius: 60% 20%;
    border-bottom-right-radius: 60% 20%;
  }

  .heroSection {
    padding: 1rem 0.5rem;
  }

  .center-text {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
  }

  .paragraph-text {
    font-size: 0.7rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
  }

  .form-wrapper {
    max-width: 100%;
    width: calc(100% - 1rem);
    padding: 0.9rem;
    margin-bottom: 1rem;
    border-radius: 12px;
  }

  .sign-in-form {
    gap: 0.7rem;
  }

  .sign-in-form h3 {
    font-size: 1rem;
    margin-bottom: 0.1rem;
  }

  .sign-in-form p {
    font-size: 0.75rem;
    margin-bottom: 0.7rem;
  }

  .sign-in-form input {
    padding: 0.5rem 0;
    font-size: 0.85rem;
  }

  .sign-in-form input::placeholder {
    font-size: 0.85rem;
  }

  .sign-in-form button {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
  }

  .toggle-password {
    right: 8px;
    font-size: 0.85rem;
  }

  .password-container input {
    padding-right: 32px;
  }

  .Msg {
    margin-top: 0.3rem;
  }

  .loggingMsg {
    font-size: 0.8rem;
  }

  .errorMsg {
    font-size: 0.8rem;
  }

  .text-KaiBridge {
    font-size: 0.75rem;
    padding: 0.5rem 5px;
  }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .navigation {
    padding: 0.4rem;
    gap: 0.3rem;
  }

  .kaizensLogo,
  .kaitestLogo {
    height: 24px;
  }

  .mainDiv {
    padding: 0;
    margin-bottom: 8px;
  }

  .heroSection {
    padding: 0.8rem 0.4rem;
  }

  .center-text {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
  }

  .paragraph-text {
    font-size: 0.65rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
  }

  .form-wrapper {
    width: calc(100% - 0.8rem);
    padding: 0.8rem;
    margin-bottom: 0.8rem;
  }

  .sign-in-form {
    gap: 0.6rem;
  }

  .sign-in-form h3 {
    font-size: 0.9rem;
  }

  .sign-in-form p {
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
  }

  .sign-in-form input {
    padding: 0.4rem 0;
    font-size: 0.8rem;
  }

  .sign-in-form button {
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
  }

  .text-KaiBridge {
    font-size: 0.7rem;
    padding: 0.4rem 3px;
  }
}