:root {
  --primary-color: rgb(101, 105, 38);
  --secondary-color: #990073;
  --white: #ffffff;
  --gray: #efefef;
  --gray-2: #757575;
  --text: #1a1a1a;
}

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

html,
body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--white);
}

.hidden {
  display: none !important;
}

/* ========== Splash ========== */
#myDiv {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--white);
}

#logo {
  width: 140px;
  max-width: 35vw;
}

#logo img {
  width: 100%;
  height: auto;
  display: block;
}

.copyright {
  text-align: center;
  color: #130b11;
  font-size: clamp(1rem, 3vw, 1.35rem);
  margin: 0.75rem 1rem 1rem;
  line-height: 1.35;
}

.dots-3 {
  width: 50px;
  aspect-ratio: 2;
  --_g: no-repeat radial-gradient(circle closest-side, #990073 90%, transparent);
  background: var(--_g) 0% 50%, var(--_g) 50% 50%, var(--_g) 100% 50%;
  background-size: calc(100% / 3) 50%;
  animation: d3 1s infinite linear;
}

@keyframes d3 {
  20% { background-position: 0% 0%, 50% 50%, 100% 50%; }
  40% { background-position: 0% 100%, 50% 0%, 100% 50%; }
  60% { background-position: 0% 50%, 50% 100%, 100% 0%; }
  80% { background-position: 0% 50%, 50% 50%, 100% 100%; }
}

/* ========== Login shell (one page) ========== */
.login-shell {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  overflow: hidden;
}

.login-left {
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.5rem 2.5rem;
  background: var(--white);
  z-index: 2;
  overflow-y: auto;
}

.login-right {
  width: 50%;
  height: 100%;
  position: relative;
  background: linear-gradient(-45deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: var(--white);
  overflow: hidden;
}

/* Role tabs */
.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1.25rem;
  width: 100%;
  max-width: 22rem;
}

.role-tab {
  flex: 1 1 auto;
  min-width: 5.5rem;
  padding: 0.45rem 0.5rem;
  border: 1.5px solid var(--primary-color);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.role-tab i {
  margin-right: 0.2rem;
}

.role-tab:hover {
  background: rgba(101, 105, 38, 0.1);
}

.role-tab.active {
  background: var(--primary-color);
  color: var(--white);
}

/* Form panels – only active one visible */
.form-panel {
  display: none;
  width: 100%;
  max-width: 22rem;
  padding: 1rem 1.1rem;
  background: var(--white);
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.form-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

.form-panel h1 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  text-align: center;
  color: var(--text);
}

.input-group {
  position: relative;
  width: 100%;
  margin: 0.55rem 0;
}

.input-group i {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
  color: var(--gray-2);
  font-size: 0.95rem;
}

.input-group input {
  width: 100%;
  padding: 0.65rem 0.75rem 0.65rem 2.35rem;
  font-size: 0.9rem;
  background: var(--gray);
  border: 2px solid transparent;
  border-radius: 0.5rem;
  outline: none;
}

.input-group input:focus {
  border-color: var(--primary-color);
  background: #fff;
}

.btn-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.55rem 0;
  border: none;
  border-radius: 0.5rem;
  background: var(--primary-color);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-submit:hover {
  background: var(--secondary-color);
}

.btn-submit:active {
  transform: scale(0.98);
}

/* Right-side heroes */
.role-hero {
  display: none;
  text-align: center;
  max-width: 20rem;
}

.role-hero.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.role-hero h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.role-hero img {
  width: 120px;
  max-width: 40vw;
  height: auto;
  border-radius: 0.6rem;
  margin: 0.5rem auto;
  display: block;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  object-fit: cover;
}

.role-hero p {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  opacity: 0.95;
  line-height: 1.4;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 0.35rem 0.5rem;
  font-size: 0.7rem;
  color: var(--gray-2);
  background: rgba(255, 255, 255, 0.9);
  z-index: 20;
}

.footer p {
  margin: 0;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .login-shell {
    flex-direction: column;
  }

  .login-left {
    width: 100%;
    height: auto;
    min-height: 58%;
    flex: 1;
    padding: 1rem 1rem 2.5rem;
  }

  .login-right {
    width: 100%;
    height: auto;
    min-height: 38%;
    flex: 0 0 auto;
    padding: 1rem;
  }

  .role-hero img {
    width: 72px;
  }

  .role-hero p {
    display: none;
  }

  .role-tab {
    font-size: 0.7rem;
    min-width: 4.8rem;
    padding: 0.4rem 0.35rem;
  }
}

@media (max-height: 560px) {
  .form-panel {
    padding: 0.65rem 0.85rem;
  }

  .form-panel h1 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
  }

  .input-group {
    margin: 0.35rem 0;
  }

  .input-group input {
    padding: 0.45rem 0.65rem 0.45rem 2.1rem;
    font-size: 0.85rem;
  }

  .btn-submit {
    padding: 0.4rem 0;
    font-size: 0.9rem;
  }

  .role-tabs {
    margin-bottom: 0.6rem;
  }

  .role-hero img {
    width: 56px;
  }

  #logo {
    width: 100px;
  }
}
