/* =============================================
   Login Admin - Cisat Learning Apps
   SMK CIBITUNG 1
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: #f5f6fa;
}

/* ===================================== ========
   LAYOUT - Two Column (Desktop)
   ============================================= */

.login-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* LEFT PANEL */
.login-left {
  flex: 0 0 50%;
  background: linear-gradient(160deg, #4f46e5 0%, #3730a3 60%, #312e81 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative background circles */
.login-left::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  top: -100px;
  left: -100px;
  pointer-events: none;
}

.login-left::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  bottom: -80px;
  right: -80px;
  pointer-events: none;
}

.login-left .logo-wrapper {
  position: relative;
  z-index: 1;
  margin-bottom: 32px;
}

.login-left .logo-wrapper img {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

.login-left .app-title {
  position: relative;
  z-index: 1;
  color: #fff;
}

.login-left .app-title h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.login-left .app-title p {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* RIGHT PANEL */
.login-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: #fff;
}

.login-right .login-form-container {
  width: 100%;
  max-width: 420px;
}

/* =============================================
   FORM CONTENT
   ============================================= */

.login-greeting {
  text-align: center;
  margin-bottom: 36px;
}

.login-greeting h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #e91e8c;
  line-height: 1.6;
}

.login-form-group {
  margin-bottom: 24px;
}

.login-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrapper input {
  width: 100%;
  padding: 13px 44px 13px 44px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #1e1e2e;
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
}

.login-input-wrapper input:focus {
  border-color: #4f46e5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.login-input-wrapper input::placeholder {
  color: #9ca3af;
  font-size: 0.9rem;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #9ca3af;
  pointer-events: none;
  flex-shrink: 0;
}

.login-eye-toggle {
  position: absolute;
  right: 14px;
  cursor: pointer;
  color: #9ca3af;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.login-eye-toggle:hover {
  color: #4f46e5;
}

.login-eye-toggle svg {
  width: 18px;
  height: 18px;
}

/* Old form-control compat */
.login-right .form-control,
.login-right .input-group .form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #1e1e2e;
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.login-right .form-control:focus,
.login-right .input-group .form-control:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  background: #fff;
}
.login-right .form-control::placeholder,
.login-right .input-group .form-control::placeholder {
  color: #9ca3af;
}
.flash-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.875rem;
}

.flash-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.875rem;
}

/* Login button */
.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 13px 24px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-login:hover {
  background: #4338ca;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
}

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

.btn-login svg {
  width: 18px;
  height: 18px;
}

/* Date footer */
.login-date {
  text-align: center;
  margin-top: 36px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e1e2e;
}

/* =============================================
   MOBILE LAYOUT (stacked)
   ============================================= */

@media (max-width: 768px) {
  .login-wrapper {
    flex-direction: column;
  }

  .login-left {
    flex: 0 0 auto;
    padding: 40px 24px 32px;
    border-radius: 0 0 32px 32px;
  }

  .login-left .logo-wrapper img {
    width: 110px;
  }

  .login-left .app-title h1 {
    font-size: 1.5rem;
  }

  .login-left .app-title p {
    font-size: 1.2rem;
  }

  .login-right {
    flex: 1;
    padding: 36px 24px 40px;
    justify-content: flex-start;
  }

  .login-right .login-form-container {
    max-width: 100%;
  }

  .btn-login {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .login-left .logo-wrapper img {
    width: 90px;
  }

  .login-left .app-title h1 {
    font-size: 1.25rem;
  }

  .login-left .app-title p {
    font-size: 1rem;
  }
}