/*
 * SIM Kerja Sama UMT — Login Page Stylesheet
 * Glassmorphism, gradient illustration panel, floating shapes, entrance animations.
 */

:root {
  --primary-blue: #0d6efd;
  --dark-blue: #003c8f;
  --accent-yellow: #ffc107;
  --bg-white: #ffffff;
  --text-dark: #1f2937;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body.auth-body {
  margin: 0;
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
}

/* ============ Layout ============ */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
}

.auth-illustration {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  flex: 1 1 58%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
  padding: 3rem;
}

.auth-panel {
  flex: 1 1 42%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: radial-gradient(circle at 50% 0%, #f4f8ff 0%, #ffffff 60%);
  position: relative;
}

@media (max-width: 991.98px) {
  .auth-illustration {
    display: none;
  }
  .auth-panel {
    flex: 1 1 100%;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
  }
}

/* ============ Floating background shapes ============ */

.floating-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.floating-shapes .shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.18;
  background: #ffffff;
  animation: floatY 9s ease-in-out infinite;
}

.floating-shapes .shape.shape-yellow {
  background: var(--accent-yellow);
  opacity: 0.25;
}

.shape-1 { width: 140px; height: 140px; top: 8%;  left: 10%; animation-duration: 10s; }
.shape-2 { width: 90px;  height: 90px;  top: 65%; left: 6%;  animation-duration: 8s;  animation-delay: 1s; }
.shape-3 { width: 60px;  height: 60px;  top: 20%; left: 80%; animation-duration: 7s;  animation-delay: 0.5s; }
.shape-4 { width: 180px; height: 180px; top: 70%; left: 72%; animation-duration: 12s; animation-delay: 2s; }
.shape-5 { width: 45px;  height: 45px;  top: 45%; left: 88%; animation-duration: 6s;  animation-delay: 1.5s; }
.shape-6 { width: 70px;  height: 70px;  top: 5%;  left: 55%; animation-duration: 9s;  animation-delay: 0.8s; }

@keyframes floatY {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(12px, -22px) scale(1.05); }
}

/* ============ Illustration scene ============ */

.illustration-scene {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  text-align: center;
  color: #fff;
}

.illustration-scene svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.25));
}

.globe-node {
  animation: pulseNode 2.4s ease-in-out infinite;
  transform-origin: center;
}

.globe-node:nth-child(2) { animation-delay: 0.4s; }
.globe-node:nth-child(3) { animation-delay: 0.8s; }
.globe-node:nth-child(4) { animation-delay: 1.2s; }
.globe-node:nth-child(5) { animation-delay: 1.6s; }

@keyframes pulseNode {
  0%, 100% { opacity: 0.6; r: 4; }
  50%      { opacity: 1;   r: 6; }
}

.globe-link {
  stroke-dasharray: 6 6;
  animation: dashMove 30s linear infinite;
}

@keyframes dashMove {
  to { stroke-dashoffset: -1000; }
}

.illustration-title {
  margin-top: 2rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.illustration-subtitle {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.illustration-badges {
  margin-top: 2rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.illustration-badges .badge-pill {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ============ Login card (glassmorphism) ============ */

.login-card-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 2;
}

.brand-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.brand-logo-img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
  box-shadow: 0 10px 25px rgba(13, 110, 253, 0.25);
}

.brand-title {
  margin-top: 1rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--primary-blue);
}

.brand-subtitle {
  margin-top: 0.3rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.login-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(0, 60, 143, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 2.25rem 2rem;
}

@media (max-width: 991.98px) {
  .login-card {
    background: rgba(255, 255, 255, 0.92);
  }
  .brand-title {
    color: var(--accent-yellow);
  }
  .brand-subtitle {
    color: rgba(255, 255, 255, 0.9);
  }
}

/* ============ Form elements ============ */

.form-label-sm {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

.input-icon-group {
  position: relative;
}

.input-icon-group .bi {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa5b1;
  font-size: 1rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-icon-group input.form-control {
  padding-left: 42px;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid #e5e9f0;
  background: rgba(255, 255, 255, 0.85);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-icon-group input.form-control:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

.input-icon-group input.form-control:focus ~ .bi {
  color: var(--primary-blue);
}

.password-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #9aa5b1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle-btn:hover {
  color: var(--primary-blue);
  background: rgba(13, 110, 253, 0.08);
}

.human-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #e5e9f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.human-check:hover {
  border-color: var(--primary-blue);
}

.human-check.is-checked {
  border-color: #198754;
  background: rgba(25, 135, 84, 0.06);
}

.human-check.is-shake {
  animation: shakeX 0.5s ease;
  border-color: #dc3545;
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

.human-check input[type="checkbox"] {
  width: 1.15em;
  height: 1.15em;
  margin: 0;
  cursor: pointer;
}

.human-check label {
  font-size: 0.88rem;
  color: var(--text-dark);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-check-input:checked {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
}

.remember-forgot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
}

.forgot-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
}

.forgot-link:hover {
  text-decoration: underline;
  color: var(--dark-blue);
}

/* ============ Login button ============ */

.btn-login {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 12px;
  background: var(--accent-yellow);
  color: var(--dark-blue);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 10px 22px rgba(255, 193, 7, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(255, 193, 7, 0.45);
  filter: brightness(1.03);
  color: var(--dark-blue);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.btn-login .spinner-border {
  width: 1.1rem;
  height: 1.1rem;
}

/* ============ Footer ============ */

.auth-footer {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.78rem;
  color: #9aa5b1;
}

@media (max-width: 991.98px) {
  .auth-footer {
    color: rgba(255, 255, 255, 0.75);
  }
}

/* ============ Entrance animations ============ */

.fade-in-up {
  animation: fadeInUp 0.7s ease both;
}

.fade-in-left {
  animation: fadeInLeft 0.8s ease both;
}

.fade-in-right {
  animation: fadeInRight 0.8s ease both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

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

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============ Alerts ============ */

.auth-alert {
  border-radius: 12px;
  font-size: 0.88rem;
  border: none;
}
