@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@100..700&display=swap');

/* ========================================= */
/* BASE – SAFE FOR ALL BROWSERS */
/* ========================================= */
html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: "Anuphan", sans-serif;

  background: url('https://sis.pharmacy.cmu.ac.th/assets/images/bg_signin.jpg')
              no-repeat center center fixed;
  background-size: cover;

  overflow-x: hidden;
  overflow-y: auto; /* ✅ สำคัญมาก */

  position: relative;
}

/* Overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(87,199,145,0.85),
    rgba(83,121,237,0.85)
  );
  backdrop-filter: blur(3px);
  z-index: 0;
}

/* ========================================= */
/* MAIN CONTAINER */
/* ========================================= */
.container {
  min-height: 100vh;     /* fallback */
  min-height: 100svh;    /* mobile safe */
  min-height: 100dvh;    /* modern */

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 24px 16px;
  gap: 24px;

  position: relative;
  z-index: 1;
}

/* ========================================= */
/* LOGIN CARD */
/* ========================================= */
.login-container {
  width: 100%;
  max-width: 900px;

  display: flex;

  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-radius: 26px;
  overflow: hidden;

  box-shadow:
    0 25px 60px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.6);

  animation: fadeUp 0.8s ease-out;
}

/* ========================================= */
/* LEFT PANEL */
/* ========================================= */
.left-panel {
  flex: 1;
  background: url('https://sis.pharmacy.cmu.ac.th/assets/images/signin_animation.gif')
              center center / cover no-repeat;
}

/* ========================================= */
/* RIGHT PANEL */
/* ========================================= */
.right-panel {
  flex: 1;
  padding: clamp(24px, 5vw, 56px);
}

.header-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.rx-logo-img {
  height: 60px;
}

.right-panel h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: #222;
}

.right-panel span {
  font-size: 14px;
  color: #555;
}

/* ========================================= */
/* INPUT */
/* ========================================= */
.input-with-icon {
  position: relative;
  margin-bottom: 16px;
}

.input-with-icon i {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: #777;
}

.input-with-icon input {
  width: 100%;
  padding: 12px 15px 12px 45px;
  border-radius: 25px;
  border: 1px solid #dde3ee;
  background: #f3f6fb;
  transition: 0.25s;
}

.input-with-icon input:focus {
  background: #fff;
  border-color: #4bbf8a;
  box-shadow: 0 0 0 4px rgba(87,199,145,0.25);
  outline: none;
}

/* ========================================= */
/* BUTTONS */
/* ========================================= */
.btn-signin {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: 30px;
  border: none;

  background: linear-gradient(135deg, #4ec99a, #4a7cf3);
  color: #fff;

  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.6px;

  box-shadow: 0 10px 25px rgba(74,124,243,0.35);
  transition: 0.3s;
}

.btn-signin:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(74,124,243,0.45);
}

.btn-cmusignin {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border-radius: 30px;
  border: none;

  background: linear-gradient(135deg, #b47cf6, #4f6cf3);
  color: #fff;
  font-weight: 600;
}

/* ========================================= */
/* DIVIDER */
/* ========================================= */
.divine-box {
  text-align: center;
  margin: 16px 0;
  font-size: 13px;
  color: #666;
}

/* ========================================= */
/* VISION CARD */
/* ========================================= */
.vision-card.two-column {
  width: 100%;
  max-width: 900px;

  padding: 26px 28px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;

  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-radius: 22px;

  box-shadow:
    0 14px 40px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.6);

  animation: fadeUp 0.8s ease-out;
}

.vision-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* LEFT */
.vision-left {
  text-align: right;
}

.vision-badge {
  align-self: flex-end;
  font-size: 14px;
  font-weight: 700;
  color: #0d6efd;
  background: rgba(13,110,253,0.12);
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.vision-text {
  display: inline-block;
  padding: 10px 10px;
  border-radius: 30px;
  background: linear-gradient(135deg, #9248f3, #4a7cf3);
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 2px;
  font-size: 14px;
}

/* RIGHT */
.vision-right {
  text-align: left;
  border-left: 1px solid rgba(0,0,0,0.08);
  padding-left: 24px;
}

.core-badge {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 700;
  color: #6f42c1;
  background: rgba(111,66,193,0.12);
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.core-value {
  display: inline-block;
  padding: 10px 30px;
  border-radius: 30px;
  background: linear-gradient(135deg, #4ec99a, #4a7cf3);
  color: #fff;
  font-weight: 800;
  letter-spacing: 2px;
}

/* ========================================= */
/* RESPONSIVE */
/* ========================================= */
@media (max-width: 992px) {
  .login-container {
    flex-direction: column;
  }

  .left-panel {
    height: 160px;
  }
}

@media (max-width: 768px) {
  .vision-card.two-column {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .vision-left,
  .vision-right {
    text-align: center;
    padding: 0;
    border: none;
  }

  .vision-badge,
  .core-badge {
    align-self: center;
  }
}

/* ========================================= */
/* ANIMATION */
/* ========================================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}